acct
acct [--help] [--version]
With no arguments, prints the welcome tip sheet (npm hides postinstall output). Use --help for the full command list.
npm install -g acct-sh
acct
acct --helpCommand reference
Package name is acct-sh. The binary is acct. One folder, one GitHub account, one identity. docs.md
Concepts
1
CLI --profile
Explicit, process-local. Affects gh / status / exec. Does not rebind git HTTPS.
2
Nearest .acct
Walks up from cwd. An empty profile in that file means unbound and wins over parent bindings.
3
Longest binding
Directory trees from acct bind / init. More specific paths beat broader ones.
4
Unbound
No acct identity. Strict mode blocks managed ops instead of guessing.
A repo-local .acct file is YAML with a profile key. An empty profile means this tree is unbound, even inside a bound parent.
profile: workStart
acct [--help] [--version]
With no arguments, prints the welcome tip sheet (npm hides postinstall output). Use --help for the full command list.
npm install -g acct-sh
acct
acct --helpacct init --id <id> --user <githubUser> --email <email> --name <name> [options]
Create a profile, bind a directory tree, wire includeIf identity, and install enforce hooks. This is the usual first command after install.
acct init \
--id work \
--user your-work-user \
--email you@company.com \
--name "Your Name" \
--bind ~/WorkProfiles
acct profile add --id <id> --user <githubUser> --email <email> --name <name> [options]
Create a profile without binding a folder. Bind it afterwards with acct bind.
acct profile add \
--id personal \
--user you-home \
--email you@home \
--name "Your Name"acct profile list
Print every profile as id, user@host, email, and protocol.
acct profile listacct profile show <id>
Print one profile as JSON. Does not include the token.
acct profile show workacct profile remove <id>
Delete the profile, its stored token, and includeIf artifacts. Bindings that pointed at it should be unbound first.
acct profile remove workacct profile token <id> (--import-gh | --stdin)
Store a token in the OS keychain. One of --import-gh or --stdin is required.
acct profile token work --import-gh
printf '%s' "$PAT" | acct profile token work --stdinacct profile ssh-key <id> (--generate | --path <path>) [--protocol https|ssh]
Generate an ed25519 key for the profile, or attach an existing private key. HTTPS isolation stays installed unless you pass --protocol.
acct profile ssh-key work --generate
acct profile ssh-key work --path ~/.ssh/id_workTrees
acct bind <dir> <profileId> [--enforce strict|warn|off]
Map a directory tree to an existing profile and refresh includeIf rules.
acct bind ~/Personal personalacct unbind <dir>
Remove a directory → profile binding. The profile itself is kept.
acct unbind ~/DownloadsInspect
acct status [--profile <id>]
Dump how cwd resolved: reason, binding, profile, identity, token presence, and the auth principal. If unhealthy, prints what is wrong, commands to run, and whether commit or push will go through. Exits 1 on error findings.
acct statusacct whoami [--profile <id>]
One line: expected GitHub user vs actual login vs commit email. Prints unbound outside a bound tree. Exits 1 on mismatch.
acct whoamiacct doctor [--online]
Scan credential-helper competition, missing install blocks, orphan bindings, sticky GH_TOKEN, enforce fallthrough, and keyring availability. Also diagnoses the cwd profile when unhealthy.
acct doctor
acct doctor --onlineacct ssh-test <id>
Test SSH auth for a profile against github.com using that profile's key.
acct ssh-test workRun
acct exec [--profile <id>] [--allow-cross-profile] <command...>
Run a command with the profile GH_TOKEN. Refuses gh auth switch / login / token because those mutate global gh state. Git HTTPS still follows cwd / .acct, not --profile.
acct exec gh pr list
acct exec --profile work --allow-cross-profile gh api useracct clone <url> [dir] [--profile <id>]
git clone with the cwd profile's GH_TOKEN in the environment. Git credentials still follow the directory binding.
acct clone https://github.com/org/repo.gitEnforce
acct enforce <strict|warn|off|on>
Set the default enforcement mode. on is an alias for strict. A binding can override this with acct bind --enforce.
acct enforce strictacct install [--global] [--force]
Wire includeIf git identity and set core.hooksPath on the current repo (local by default).
acct installacct uninstall [--restore-backup]
Remove the acct-managed gitconfig block and unset global core.hooksPath. OS helpers (osxkeychain, wincred, libsecret) may still answer for github.com — doctor will say so.
acct uninstall --restore-backupShell
acct hook <bash|zsh|fish|powershell>
Print a shell hook. Eval it from your shell startup so cd rebinds env (or clears it when unbound).
eval "$(acct hook zsh)"
eval "$(acct hook bash)"
acct hook fish | source
acct hook powershell | Out-String | Invoke-Expressionacct shell-env [--powershell]
Print env exports for the cwd profile. Used by the shell hook; you rarely run this yourself.
acct shell-envacct wrap-install
Install optional PATH shims so gh is invoked as acct exec gh. Then add the wrap-path export to your shell.
acct wrap-install
eval "$(acct wrap-path)"acct wrap-path [--powershell]
Print the PATH export for wrap shims. Installs the shims if they are missing.
eval "$(acct wrap-path)"Internal
acct hook-run <pre-commit|pre-push>
Internal entry for enforce hooks. pre-commit checks commit identity; pre-push checks auth. On failure, prints the block message plus a status diagnosis.
acct hook-run pre-pushEnvironment
Config lives in config.yaml under the config dir. Tokens live in the OS keychain, never in that file.
Behavioral contracts are in the invariants and threat model.