neo repo
Manage repositories
neo repo [OPTIONS] <COMMAND>neo repo create
Section titled “neo repo create”Create a repository.
Idempotent: a 409 conflict is reported as “already exists” and exits 0.
neo repo create [OPTIONS] <TARGET>| Option | Value | Required | Default | Env | Values | Description |
|---|---|---|---|---|---|---|
<TARGET> |
yes | <owner>/<name> — owner defaults to the authenticated handle when a stored login exists |
||||
--visibility |
<VISIBILITY> |
no | public |
public, internal, private |
Visibility for the new repository. Defaults to public. Ignored when it already exists — create never changes an existing repo’s visibility |
neo repo push
Section titled “neo repo push”Ensure a repo exists, wire a git remote, and push this checkout.
Auth comes from neo auth login or NEOSOURCE_TOKEN env (set NEOSOURCE_USER too if you skip login).
neo repo push [OPTIONS] <TARGET> [GIT_ARGS]...| Option | Value | Required | Default | Env | Values | Description |
|---|---|---|---|---|---|---|
<TARGET> |
yes | <owner>/<name> — owner defaults to the authenticated handle when a stored login exists |
||||
--remote |
<REMOTE> |
no | Remote name to create/update. Defaults to origin, or to neosource beside an origin that belongs to a different repo — see neo push --remote |
|||
--visibility |
<VISIBILITY> |
no | public |
public, internal, private |
Visibility applied ONLY when the repo doesn’t exist yet and must be created; has no effect on an already-existing repo’s visibility. Defaults to public — note that the top-level neo push spells the same flag with a private default |
|
--runner |
no | Run the CI this push triggers on this machine — see neo push --runner |
||||
<GIT_ARGS> |
no | Extra arguments forwarded to git push after the remote name. Defaults to HEAD:refs/heads/<branch> --follow-tags |
neo repo adopt
Section titled “neo repo adopt”Take over a local checkout: create, push everything, become origin.
The other half of neo push, which never displaces an origin belonging to somewhere else (it writes neosource beside it, and takes the origin name only when nothing else claims it). Adopt makes neosource this checkout’s origin regardless and demotes the old one to a second remote (default github), so git push goes here from now on.
Order of operations: create the repo if it doesn’t exist → push refs/heads/* and refs/tags/* BY URL (never forced, never --mirror) → only then rewrite the remotes. A failed push therefore leaves the checkout untouched. The old origin URL is never deleted, and branches that tracked origin are re-pointed at the new one.
The adopted repo carries NO upstream-relationship record: neosource does not track it as imported from anywhere, and nothing syncs back unless you pass --mirror-back.
neo repo adopt [OPTIONS]| Option | Value | Required | Default | Env | Values | Description |
|---|---|---|---|---|---|---|
--to |
<TO> |
no | <owner>/<name> on neosource. Inferred when omitted: owner = your handle, name = the GitHub origin’s repo name, else the work-tree directory name |
|||
--visibility |
<VISIBILITY> |
no | private |
public, internal, private |
Visibility applied ONLY when the repo has to be created. Defaults to private — adopt takes over an existing checkout, so the safe default is not to publish it | |
--old-remote |
<OLD_REMOTE> |
no | github |
Name the current origin is renamed to. Refuses if a remote by that name already exists with a different URL — the old URL is never lost |
||
--mirror-back |
no | Also register a push mirror from neosource back to the GitHub repo origin pointed at, so the old home keeps receiving updates. Requires a linked GitHub account with the admin:public_key scope; a missing scope prints the elevation URL and is not fatal |
||||
--dry-run |
no | Print the plan and exit, changing nothing. One read-only existence probe against the server is all it sends: nothing is created, pushed or rewritten | ||||
--yes |
no | Accept a non-public target host (localhost, a private IP, .internal) without naming it via --host. Debug builds default to the local dev stack and NEOSOURCE_API is set in every dev worktree, so adopt refuses to repoint origin there unless you say so |
||||
--force |
no | Proceed past the safety refusals: an origin already on this forge but pointing at a different repo, and a target repo that shares no history with this checkout |