Codeman is a thin launcher around codex that makes permission level selection explicit and fast.
- GitHub Sponsors: https://github.com/sponsors/shabo
- Patreon: https://www.patreon.com/shabers
| Level | Name | Risk | Description |
|---|---|---|---|
l1 |
safe |
π’ | read-only sandbox + strict approvals |
l2 |
cautious |
π’ | workspace-write + strict approvals |
l3 |
balanced |
π‘ | workspace-write + on-request approvals |
l4 |
autonomous |
π‘ | workspace-write + on-failure approvals |
l5 |
networked |
π | l4 + network access |
l6 |
full |
π΄ | danger-full-access + no approvals |
l7 |
reckless |
π¨ | bypass sandbox + bypass approvals |
High-risk levels can execute destructive commands including file deletions.
curl -fsSL https://raw.githubusercontent.com/shabo/codeman/main/install.sh | bash -s -- --repo https://github.com/shabo/codeman.gitgit clone https://github.com/shabo/codeman.git
cd codeman
./install.sh --local
source ~/.zshrccodeman- Prints the mode list and asks you to choose explicitly
codeman help
codeman modes
codeman l1
codeman full autonomy "clean up temp files"
codeman resume l3 --last
codeman resume l3 019c5410-c382-7551-a290-6cd52a31c9dc
codeman fork l6 --last
codeman -y l3 "skip the press-Enter confirmation"
codeman prefix
codeman prefix set "MBP-Blue"
codeman version
codeman upgradecodeman --no-notify l6
# short flag
codeman -N l4If Slack or Discord webhook is configured, Codeman can notify when:
- input/approval is likely needed (
SandboxDenied, permission issues) - task completes
- Create a webhook URL
- Slack: create an Incoming Webhook and copy the webhook URL
- Discord: create a Webhook for a channel and copy the webhook URL
- Add the webhook URL to your shell environment
- Slack:
export CODEMAN_SLACK_WEBHOOK_URL='https://hooks.slack.com/services/...'
- Discord:
export CODEMAN_DISCORD_WEBHOOK_URL='https://discord.com/api/webhooks/...'
- Slack:
- Persist it so it works in every terminal
- Add the
export ...line(s) to~/.zshrc(or~/.bashrc) - Then reload your shell:
source ~/.zshrc
- Add the
- Verify it works
codeman notify-test
- If you see
βΉοΈ No Slack/Discord integration configured..., your env var is not set in this shell. - If you see
π Webhook is configured, but notifications are disabled..., remove-Nor unsetCODEMAN_NOTIFY_DISABLED.
- If you see
- Choose when notifications should fire (optional)
export CODEMAN_NOTIFY_ON='wait,complete'
- Customize the label (optional)
export CODEMAN_NOTIFY_PREFIX='MBP-Blue' export CODEMAN_NOTIFY_PROJECT_CODENAME='HiveCore'
- Disable notifications
- One run:
codeman -N l3
- Globally:
export CODEMAN_NOTIFY_DISABLED=1
- One run:
export CODEMAN_SLACK_WEBHOOK_URL='https://hooks.slack.com/services/...'
export CODEMAN_DISCORD_WEBHOOK_URL='https://discord.com/api/webhooks/...'Optional controls:
export CODEMAN_NOTIFY_PREFIX='MBP-Blue'
export CODEMAN_NOTIFY_HOST_CODENAME='MBP-Blue'
export CODEMAN_NOTIFY_PROJECT_CODENAME='HiveCore'
export CODEMAN_NOTIFY_ON='wait,complete'
export CODEMAN_NOTIFY_COOLDOWN_SEC=30
export CODEMAN_NOTIFY_DISABLED=1codeman prefix
codeman prefix set "MBP-Blue"
codeman prefix clearPrefix behavior:
- Notification prefix defaults to host name
- If
codeman prefix set ...was used, saved prefix is used first - If unset,
CODEMAN_NOTIFY_HOST_CODENAMEis used - Project label uses
CODEMAN_NOTIFY_PROJECT_CODENAME, otherwise git repository name
Notification format is:
π¨ <prefix-or-hostname> π <project-codename-or-repo> β³ Codeman is waiting for your input/approval
Manual test:
codeman notify-testIf no webhook is configured, Codeman prints:
βΉοΈ No Slack/Discord integration configured. There won't be notifications.
If webhook is configured but notifications are suppressed (-N or CODEMAN_NOTIFY_DISABLED=1), Codeman prints:
π Webhook is configured, but notifications are disabled (--no-notify/-N or CODEMAN_NOTIFY_DISABLED=1).
codeman upgradecodeman upgrade pulls from origin on the current branch and reapplies local install wiring.
Codeman uses the VERSION file for codeman version.
This repo can auto-create a tag and GitHub Release on merge to main if VERSION was bumped.
Workflow:
- Bump the version in your branch:
codeman bump patch
- Commit the
VERSIONchange as part of your PR. - Merge the PR to
main. - GitHub Actions will run CI, then create/push a tag like
v0.1.1and create a GitHub Release (if the tag does not already exist).
codeman bump patch
codeman bump minor
codeman bump majorcodeman bump patch --commit --tagThis will:
- update
VERSION - create a git commit
- create an annotated tag like
v0.1.1
Generate a completion script and add it to your shell config.
codeman completion zsh > ~/.codeman-completion.zsh
echo 'source ~/.codeman-completion.zsh' >> ~/.zshrc
source ~/.zshrccodeman completion bash > ~/.codeman-completion.bash
echo 'source ~/.codeman-completion.bash' >> ~/.bashrc
source ~/.bashrcbin/codeman: main commandbin/codeman-install: idempotent zsh wiring toolbin/codeman-aliases.zsh: optional aliasesinstall.sh: bootstrap installerVERSION: current release version
