Keeping Oscar up to date, backed up and healthy: updates and releases, backup and restore, profiles, the configuration command, logs, status and diagnostics, and shell completion.
Updating
oscar update --check # is there a newer release? (changes nothing)
oscar update # download, verify, install (asks first)
oscar update --rollback # put the previous binary back (run again to undo)Oscar never updates by itself: only oscar update installs anything, and on a
terminal it asks first (without a terminal it needs --yes).
What oscar update does (the default source, the release manifest; see
Release channel):
- Downloads
latest.jsonandlatest.json.minisigfrom Oscar's website and checks the signature with the release key built into the binary before anything in the manifest is read. The signed comment must name the manifest and its date (oscar latest.json <date> …), and a manifest dated before one this home already accepted is refused (the newest date is kept inupdate-manifest.seenin Oscar's home), so an old signed manifest cannot be served again as the latest. - Takes the entry of your channel. stable (the default) takes releases
only; beta takes the newer of the beta and the stable entry. An entry
older than the running version is not installed (an old manifest served
again, or a build newer than the channel) unless you pass
--allow-downgrade, for example to go back from beta to stable. An entry withmin_fromnewer than your version asks you to update to that version first. - Downloads the archive for this machine (x86_64 or aarch64 Linux) from the URL in the manifest — any host, HTTPS only — and checks its size and SHA-256 against the signed manifest, which is the authority.
- Unpacks
oscar, runs--versionto make sure it works here and is the version it claims to be, keeps the running binary as.oscar.previousbeside it, and renames the new one into place. The rename is atomic: a failure leaves the old binary as it was. - If the gateway runs as a service, offers to restart it (
--restartrestarts without asking). It also names other profiles' gateway services and gateway processes that still run the old binary.
--tag v0.2.0 installs a release the manifest names, or an older one from the
public repository (update_releases), verified through the SHA256SUMS and
SHA256SUMS.minisig attached to that release (the signed comment must name
the release).
| Option | Meaning |
|---|---|
--check |
only report |
--channel stable|beta |
this run's channel (default: update_channel, else stable) |
--tag <tag> |
install this release, older ones included |
--allow-downgrade |
install the channel's release even when it is older than this one |
--yes, -y |
do not ask |
--restart |
restart the gateway service afterwards |
--rollback |
swap the binary with .oscar.previous |
--from-source [DIR] |
git pull --ff-only, cargo build --release --locked, install the result (DIR defaults to the checkout this binary was built from) |
Settings (oscar config set …, or the environment):
| config.toml | Variable | Default |
|---|---|---|
update_channel |
OSCAR_UPDATE_CHANNEL |
stable |
update_source |
OSCAR_UPDATE_SOURCE |
manifest; forge is the old route below |
update_manifest |
OSCAR_UPDATE_MANIFEST |
https://oscar-agent.com/latest.json (the signature is the same URL + .minisig) |
update_releases |
OSCAR_UPDATE_RELEASES |
https://gitlab.com/ArkHost/oscar-agent (the public repository, for --tag) |
update_url |
OSCAR_UPDATE_URL |
forge only: the forge's address (/api/v1 is added when missing) |
update_repo |
OSCAR_UPDATE_REPO |
forge only: ArkHost/OscarAgent |
| — | OSCAR_UPDATE_TOKEN |
forge only: a token for a private repository (environment or credentials.env) |
No token is ever sent to the manifest host or a download host. HTTPS is required, except for a server on this machine (127.0.0.1, localhost).
The old route, a forge's releases (update_source = forge, opt-in): Oscar
asks a Gitea/Forgejo forge for its releases (GET <update_url>/repos/<update_repo>/releases), picks the newest of the channel
(beta takes pre-releases too), checks SHA256SUMS.minisig against the built-in
key (the signed comment must name the release) and the archive's SHA-256
against SHA256SUMS. There the token goes only to the forge's own origin
(scheme, host and port of update_url); downloads are followed through
redirects by Oscar itself, and a redirect to another host (object storage, a
CDN) gets no token. Setting update_url or update_repo alone does not switch
the source (Oscar says so when it sees them).
A binary built from a checkout carries the release key of that checkout. While
release/oscar-release.pub is the placeholder, oscar update refuses to go on
(nothing can be verified) and says so; --from-source is the way to update.
There is no option to skip the signature check.
Release channel
Releases are published in the public GitLab repository
(https://gitlab.com/ArkHost/oscar-agent: each release links its binaries) and
announced by latest.json on the website (https://oscar-agent.com/latest.json),
signed with the release key (minisign, key id
91C55A40A8ABF7DE, public key in release/oscar-release.pub; the secret key
stays offline with the owner). oscar update and install.sh read the
manifest; the repository is where the files live.
The manifest
{
"schema": 1,
"name": "oscar",
"date": "2026-11-23T12:00:00Z",
"channels": {
"stable": {
"version": "0.2.0",
"tag": "v0.2.0",
"date": "2026-11-23T12:00:00Z",
"notes_url": "https://gitlab.com/ArkHost/oscar-agent/-/blob/v0.2.0/CHANGELOG.md",
"min_from": "0.1.0",
"assets": {
"x86_64-unknown-linux-musl": {
"url": "https://gitlab.com/ArkHost/oscar-agent/-/releases/v0.2.0/downloads/oscar-v0.2.0-x86_64-unknown-linux-musl.tar.gz",
"sha256": "<64 hex digits>",
"size": 9876543
},
"aarch64-unknown-linux-musl": { "url": "…", "sha256": "…", "size": 9123456 }
}
},
"beta": { "version": "0.3.0-beta.1", "tag": "v0.3.0-beta.1", "…": "…" }
}
}schemais 1; a manifest of another format is refused (install a newer Oscar withinstall.sh).nameis"oscar".date(optional at the top) is when the manifest was made, in the one formYYYY-MM-DDTHH:MM:SSZ; when present it must equal the date in the signed comment.- Each channel (
stable,beta; either may be missing) hasversion,tag(v+ version),date,notes_url(the release's entry inCHANGELOG.mdat its tag;oscar update --checkshows it), optionallymin_from(the oldest version that may update straight to this one), andassetsby target triple, each withurl(HTTPS, any host),sha256andsize. - The signature,
latest.json.minisigbeside it, is a minisign signature over the exact bytes oflatest.json, with the trusted commentoscar latest.json <date> stable=<tag> beta=<tag>. Oscar andinstall.shcheck it before reading anything in the file, and refuse a signature whose comment does not start withoscar latest.json <date>(a release'sSHA256SUMS.minisig, for example). Oscar remembers the newest date it accepted and refuses an older manifest, and it does not install a release older than itself without--allow-downgrade.
Every release also carries SHA256SUMS and SHA256SUMS.minisig (trusted
comment oscar <tag>), so a release that the manifest no longer names can
still be installed and verified (oscar update --tag, install.sh --version).
Cutting a release
- Bump the version in
Cargo.toml(andVERSION;cargo update -wupdatesCargo.lock), move the[Unreleased]notes inCHANGELOG.mdunder a heading for the new version (## [0.2.0] - <date>), runscripts/notices-check.sh(every crate in the binary must be inTHIRD_PARTY_NOTICES.md), commit, tag and push to the GitLab repository:A tag with agit tag v0.2.0 && git push gitlab v0.2.0 # gitlab: the public repository's remote-(v0.3.0-beta.1) is a pre-release and goes to the beta channel; any other tag goes to stable (and to beta, unless a newer beta is out). .gitlab-ci.ymlruns: build checks that the tag matches the version, that the public key is not the placeholder, thatCHANGELOG.mdhas the version's entry (a pre-release may use[Unreleased]) and thatTHIRD_PARTY_NOTICES.mdlists every crate in the binary with a reviewed license (scripts/notices-check.sh), builds static musl binaries for x86_64 and aarch64 with cargo-zigbuild (zig pinned and checked by SHA-256), packsoscar-<tag>-<target>.tar.gz(the binary,LICENSE,THIRD_PARTY_NOTICES.md,README.md), checks that the x86_64 binary reports the version, and writesSHA256SUMS. release writeslatest.jsonwithscripts/make-manifest.sh(keeping the other channel of the manifest published now, once its signature verifies againstrelease/oscar-release.pub; it refuses to go back to an older release), signsSHA256SUMSandlatest.jsonwithscripts/sign-release.shwhenMINISIGN_SECRET_KEYis set (both signatures are checked againstrelease/oscar-release.pubbefore anything is published), uploads every file to the generic package registry (packageoscar, version without thev), creates the GitLab release with permanent links (/-/releases/<tag>/downloads/<file>), and keepslatest.jsonandlatest.json.minisigas job artifacts.- Put the signed
latest.jsonandlatest.json.minisigon the website: download the release job's artifacts and runThe script publishes nothing unless the signature verifies withscripts/publish-manifest.sh dist/ /var/www/oscar-agent.com/ # a folder scripts/publish-manifest.sh dist/ deploy@web:/var/www/site/ # scp scripts/publish-manifest.sh dist/ https://dav.example/site/ # HTTP PUT (PUBLISH_TOKEN)release/oscar-release.puband names the manifest. WithMANIFEST_TARGET(an https:// folder taking PUT) set in the CI variables, the manual publish-manifest job does the same from the pipeline. Also copyinstall.shto the website once (and whenever it changes), for the install line in Getting started.
Signing on your own machine instead (the key never touches CI): leave
MINISIGN_SECRET_KEY unset. The pipeline then publishes the release unsigned
(nothing trusts it yet) and uploads the unsigned latest.json. On your
machine:
read -rs GITLAB_TOKEN; export GITLAB_TOKEN # a token with the api scope, for --upload (kept out of the shell history)
scripts/sign-release.sh --fetch v0.2.0 --upload --key ~/secure/oscar-release.key dist-v0.2.0
scripts/publish-manifest.sh dist-v0.2.0 deploy@web:/var/www/site/--fetch downloads SHA256SUMS, latest.json and the archives from the
package registry and checks them against each other; the script signs both
files (minisign asks for the password, or reads MINISIGN_PASSWORD), checks
the signatures against release/oscar-release.pub, and --upload puts
SHA256SUMS.minisig and the signed manifest in the package registry and links
SHA256SUMS.minisig from the release. Without --fetch, it signs the files
already in the folder.
To check a release by hand:
minisign -Vm latest.json -p release/oscar-release.pub # the manifest
minisign -Vm SHA256SUMS -p release/oscar-release.pub # the release's sums
sha256sum -c SHA256SUMS --ignore-missing # the archivesSetting up the GitLab project
- Settings → Repository → Protected tags: protect
v*, so protected variables reach tag pipelines and only maintainers can release. - Settings → CI/CD → Variables, to sign in CI (skip both to sign locally):
MINISIGN_SECRET_KEY— protected, masked, environment scoperelease— the second (base64) line of the secret key file (a masked variable cannot hold the comment line; a variable of type File with the whole file works too), andMINISIGN_PASSWORDthe same way if the key has a password. The scope keeps them away from the build job, which runs dependencies' build scripts. Optional:RELEASE_TOKEN(a project access token with the api scope, if the job token may not create releases),MANIFEST_URL(the published manifest; empty starts a new one),MANIFEST_TARGETandPUBLISH_TOKEN(for the publish-manifest job). - The package registry must be readable by everyone (a public project with the package registry enabled), since installs download from it without a token.
Releases and the signing key
Releases are made by the GitLab pipeline above. The workflow
.gitea/workflows/release.yml is the old route (Gitea or Forgejo Actions
on the private forge: binaries, a signed SHA256SUMS, a forge release) and is
kept only for installs that set update_source = forge.
Signing key
Releases are signed with a minisign key pair. The public key lives in the repository and is built into every binary; the secret key never goes into the repository.
The key exists (key id 91C55A40A8ABF7DE). Should it ever be made again, on
a machine you trust:
minisign -G -p oscar-release.pub -s oscar-release.key
# (or `minisign -G -W ...` for a key without a password)Then:
- Replace
release/oscar-release.pubwithoscar-release.pub(both lines). - Put its second line (the base64 key) into
install.shasOSCAR_PUBKEY="…"(a test checks the two match). - Either set the CI variables above, or keep signing locally with
scripts/sign-release.sh. - Keep
oscar-release.keyoffline (a password manager, an encrypted backup). Anyone with it can sign releases every Oscar trusts.
The pipeline refuses a tag that does not match the version, refuses to run
while the public key is the placeholder, and checks every signature against
release/oscar-release.pub before it publishes anything.
Changing the key means a new public key in a new release: binaries built
before it keep trusting the old key, so sign one release with the old key that
carries the new one, or tell users to reinstall with install.sh.
Installing from a release
curl -fsSLO https://oscar-agent.com/install.sh
sh install.sh # → ~/.local/bin/oscar
sh install.sh --system # → /usr/local/bin/oscar
sh install.sh --channel beta # the newest pre-release (or stable, if newer)
sh install.sh --version v0.1.0 # a given release, older ones too
./install.sh --from-source # from a checkout: build with cargoThe script downloads latest.json and latest.json.minisig, then the
archive for this machine, and installs only when both checks pass:
- the minisign signature of
latest.jsonby Oscar's release key, checked withminisignwhen it is installed, otherwise with OpenSSL 3 (Ed25519, and BLAKE2b-512 for prehashed signatures), including the signed comment that names the manifest — before anything in the manifest is read; - the archive's size and SHA-256 against the signed manifest.
A release the manifest no longer names (--version) comes from the public
repository, checked through its signed SHA256SUMS instead. With neither
minisign nor OpenSSL 3 the script stops (install minisign, or build from
source). It never asks the downloaded binary to check itself: a tampered
binary would simply say yes. When there is no release yet, no binary for the
machine, or the script still has the placeholder key, it builds from source if
it runs from a checkout, and otherwise says how to.
Trade-off: the script carries the public key it checks against, so it is only
as trustworthy as the copy you run. Fetch it over HTTPS from the website (or
use a checkout), and for extra assurance compare its OSCAR_PUBKEY with the
key published in the repository before running it. The checksum alone only
catches broken downloads; it is the signature over the manifest that catches
tampering.
Variables: OSCAR_INSTALL_MANIFEST (the manifest; default
https://oscar-agent.com/latest.json), OSCAR_INSTALL_RELEASES (the public
repository; default https://gitlab.com/ArkHost/oscar-agent),
OSCAR_INSTALL_PUBKEY (another release key, for forks). An existing binary is
kept as .oscar.previous, so oscar update --rollback works after a reinstall
too.
The old route, a forge's releases, is still there with
OSCAR_INSTALL_SOURCE=forge: OSCAR_INSTALL_URL (a Gitea or Forgejo forge),
OSCAR_INSTALL_REPO (owner/repo), and
OSCAR_UPDATE_TOKEN for a private repository (sent only to the forge, never
on a command line). Fetch the script with the token too; a header file keeps
it off the command line:
(umask 077; printf 'Authorization: token %s\n' "$OSCAR_UPDATE_TOKEN" > ~/.oscar-auth)
curl -fsSL -H @"$HOME/.oscar-auth" -o install.sh \
https://forge.example.org/owner/repo/raw/branch/main/install.sh
rm ~/.oscar-auth
OSCAR_INSTALL_SOURCE=forge sh install.shBackup and restore
oscar backup # → oscar-backup-default-<date>.tar.gz
oscar backup --out ~/safe/oscar.tar.gz
oscar backup --include-secrets --out ~/safe/oscar-all.tar.gz
oscar restore ~/safe/oscar.tar.gz --dry-run # what would happen
oscar restore ~/safe/oscar.tar.gz --force # replace the current home
oscar backup --all-profiles --out ~/safe/every-profile.tar.gz
oscar restore ~/safe/every-profile.tar.gz --dry-runA backup is a .tar.gz of Oscar's home with OSCAR-BACKUP.json (format,
Oscar's version, date, profile, whether secrets are inside) and the files
under home/. It is written mode 0600, and never inside the home itself.
Left out:
- caches and what Oscar rebuilds:
cache/,skills-bundled/,logs/,mcp/cache/; - SQLite's
-waland-shmfiles: each database (oscar.db,gateway.db) is copied through SQLite as one consistent snapshot, even while the gateway writes to it; - other profiles (
profiles/): back each up withoscar -p NAME backup, or all of them at once with--all-profiles(below); - links that point outside the home;
- unless
--include-secrets:credentials.envand every other*.env,auth/(sign-ins, key-pool state),matrix-crypto/(the Matrix device keys),vault/,mcp/tokens/, memory providers'config.json, and*.key/*.pemfiles. With--include-secretsthe output says the archive contains secrets; keep it private.
Restore reads the whole archive before writing anything and refuses it when an
entry would land outside the home (.., absolute paths, links that lead
outside) or is anything but a file, folder or link (hard links, devices). It
unpacks into a new folder beside the home and then swaps it in. An existing
home is never overwritten: without --force restore stops; with --force the
old home is moved to <home>.before-restore-<date>, not deleted. Secret files
come back 0600 and secret folders 0700. Restore stops nothing and restarts
nothing; restart the gateway yourself afterwards (oscar gateway restart).
A backup without secrets needs the keys set up again (oscar setup).
oscar backup --all-profiles writes one archive with a backup of every
profile that exists (OSCAR-BACKUP-ALL.json listing them, and
profiles/<name>.tar.gz, each exactly what oscar -p NAME backup writes;
--include-secrets applies to all of them). oscar restore recognises such
an archive: it checks every profile's archive first, then restores each
into its own home, the default profile first, with the same rules as above
(--dry-run, and --force to move existing homes aside). Restoring the
default profile moves the whole old ~/.oscar aside, other profiles with
it; they come back from the archive (and the old ones stay in the folder
moved aside).
Profiles
Profiles are separate Oscar homes on one machine: their own settings, keys,
memory, sessions, skills and gateway service. The default profile is
~/.oscar; profile work is ~/.oscar/profiles/work.
oscar profile create work # an empty home
oscar profile create work --from default # copy config.toml and SOUL.md
oscar profile clone default play # everything but secrets and history
oscar profile clone default play --with-secrets # keys too
oscar -p work setup # set it up
oscar -p work # chat as it
oscar profile alias work # ~/.local/bin/oscar-work runs `oscar -p work`
oscar -p work gateway install --start # its own service: oscar-gateway-work.service
oscar gateway list # every profile's gateway: service, state, platforms
oscar gateway list --all # also profiles with no gateway
oscar status --all # every profile at a glance
oscar profile list # * marks the one in use
oscar profile show work
oscar profile use work # `oscar` now means `oscar -p work`
oscar profile use default # back to ~/.oscar
oscar profile rename work job # the folder, and the default if it was this one
oscar profile export work --out work.tar.gz # a backup of its home
oscar profile import work.tar.gz --name work2 # a new profile from an archive
oscar profile delete work # asks you to type the name (--yes without a terminal)Choosing the home: --home > --profile/-p > OSCAR_HOME >
OSCAR_PROFILE > the profile oscar profile use chose (kept in
~/.oscar/active-profile) > ~/.oscar. Giving both --home and
--profile is an error, and a named profile that does not exist is an error
(create it first), so a typo never starts an empty home; a chosen default
that was removed falls back to ~/.oscar with a note. rename refuses the
default profile and a profile whose gateway service is installed (its unit
names the folder: uninstall it, rename, install it again) or running; an
oscar-NAME alias keeps the old name until you make a new one. delete refuses the default profile,
the profile in use, and a profile whose gateway service is still installed
(oscar -p NAME gateway uninstall first). export/import take
--include-secrets and --force like backup/restore.
clone FROM NAME makes a new profile with everything of FROM except its
secrets and its history: config.toml (with its room tables and
personalities), SOUL.md, skills, memory, personality files and the MCP
servers, each marked untrusted in the copy (their tools that do not say they
only read ask a person; oscar -p NAME mcp trusts one again). Left out:
credentials.env and the other *.env files, sign-ins, the Matrix keys, the
vault and MCP tokens (unless --with-secrets, which copies them, private),
and always the databases (sessions, the gateway's pairings and room changes
made from the chat, the board), checkpoints and the input history.
When a named profile runs, tools are kept out of all of ~/.oscar (the
default profile and every other profile), not just its own folder.
Profiles from a repository
A team can share a setup as a repository: config.toml (settings, never
keys), SOUL.md, skills/<name>/…, personalities/… and an optional
mcp.json.
oscar profile install https://git.example.org/team/oscar-team.git # profile `oscar-team`
oscar profile install git@example.org:me/setup.git --name mine
oscar profile install ./shared-profile # a folder or an archive works too
oscar profile update oscar-team # fetch it againInstalling shows what the repository holds first. Then:
- a repository that carries secrets is refused whole: a credentials or env
file, a sign-in or key file, or text that looks like a key anywhere
(
mcp.jsonmay name${VARIABLES}, never hold values); - its skills are copied (each scanned like a hub skill; a dangerous one is
left out) but switched off (
skills_disabledin the new profile) unless you say yes; - its MCP servers are added untrusted, and off unless you say yes; each is
shown first — what it runs or where it connects, its headers and
environment with the values masked. An untrusted server's
${VARIABLE}references may only read variables namedMCP_<SERVER>_*(for a servertickets,MCP_TICKETS_TOKEN), so a header cannot carry another key away; - only the harmless part of its
config.tomlis copied as it is: the model and provider, display and conversation preferences, limits,denyrules, skill, bundle and personality tables. Every other setting is listed with its value and needs a yes: hooks, webhooks, quick commands, allow rules, the approval mode and sandbox, room settings and the rest ("asks first"); - risky settings are listed apart and
--yesdoes not keep them: a custom provider ([providers.<name>]: itskey_cmdruns a command, itsbase_urlgets a key), anybase_urlor URL,sudo_*, who may talk to or approve for Oscar (*_allowed_*,*_admins, approvers, pairing),web_fetch_allow_private,ca_bundle,terminal_env_passthrough,unattended_approve,workspace, program paths and commands, and any value that reads a${VARIABLE}. A yes typed at a terminal keeps them, or--accept-risky; - anything else (scripts at the top, other folders) is listed and left out.
Off a terminal nothing is asked and the answers are no; --yes says yes to
the skills, the servers (they stay untrusted) and the settings that ask
first, never to the risky ones. Nothing the repository brings runs while it
installs: the clone runs with git hooks off, and files are only read and
written. Keys are added afterwards with oscar -p <name> setup. A URL with
a user name, password or token before @ is refused (use SSH or a
credential helper).
The source and a digest of each installed file are kept in the profile's
profile-source.json. update fetches again (and says so when the commit
has not changed), replaces the files you did not touch, keeps the ones you
edited (and says which), leaves files the repository dropped in place, and
asks again about skills, servers and hooks.
Configuration from the command line
oscar config show # settings, environment overrides, which keys are saved
oscar config get theme
oscar config set theme gruvbox # or the variable name: OSCAR_THEME
oscar config unset theme
oscar config set OPENROUTER_API_KEY - # a key, typed hidden (or piped), into credentials.env
oscar config unset OPENROUTER_API_KEY
oscar config check # unknown keys, bad values, unresolved ${VAR}, with line numbers
oscar config edit # $VISUAL / $EDITOR, then check
oscar config pathset checks the key and the value before writing: provider ids, approve
(ask, auto, smart, never), sandbox (host, workspace, docker, ssh), themes, browser modes,
memory providers, search backends, voice backends, update channels, numbers
in their ranges, on/off values, URLs, the fallback chain. It changes only the
key's own line, so comments, blank lines and alignment stay. A lower-case
key goes to config.toml; an UPPER_SNAKE name that is not the variable of
a setting (OPENAI_API_KEY, TELEGRAM_BOT_TOKEN, SEARXNG_URL) goes to
credentials.env, written mode 0600 from the first byte, its value never
echoed; - as the value reads it from stdin (hidden on a terminal), so it
stays out of the shell history and the process list. Anything else that
looks like a secret (a lower-case name like api_key, or a value shaped
like a key) is refused for config.toml. show never prints a secret:
values in credentials.env appear as ********. check works even when
config.toml is broken (most commands then stop), and also reports a
credentials.env that others can read.
Values in config.toml may refer to variables: base_url = "https://${LLM_HOST}/v1". A reference is filled in from the environment,
then from credentials.env, when the file is read; one that nothing
resolves stays as written and oscar config check warns about it. Saving
from Oscar (oscar model set, setup) writes a value that did not change
back as the reference, so a ${VAR} never turns into its value on disk.
$${VAR} stands for a literal ${VAR}. See
configuration.
Logs
oscar logs # the gateway's last 50 lines
oscar logs gateway -f # follow
oscar logs errors --since 2h
oscar logs agent --grep timeout -n 200
oscar logs audit # auto-approvals and host commandsWhere logs come from:
- gateway — a gateway (
oscar gateway serve,oscar matrix|telegram|discord serve) copies everything it writes to stderr intologs/gateway.log, while stderr (the terminal, or journald for the service) still gets it unchanged. When the gateway service is installed,oscar logs gatewayreads journald (journalctl -u oscar-gateway[-NAME].service);--filereads the file. - agent —
oscar,oscar chat,oscar runandoscar servewrite their log events tologs/agent.log. - errors — warnings and errors from both, and the error a gateway stopped
with, in
logs/errors.log. - audit —
audit/approvals.jsonlandaudit/commands.jsonl, merged by time, one line per record. - tui —
logs/tui.log, written while the full-screen chat is open.
Files are mode 0600, capped at 10 MB (OSCAR_LOG_MAX_BYTES) and rotated
into .1, .2, .3; reading includes the rotated generations. Lines are
masked when written and again when shown: keys, tokens, passwords in URLs,
Authorization headers and every value from credentials.env and the
other *.env files.
--since takes 30s, 10m, 2h, 1d, 1w or sums like 1h30m;
--grep a regular expression (any case); -n how many lines.
Status and diagnostics
oscar status — version, profile and home, provider and model, the gateway
(service state, or a running gateway process for this home), the configured
chat platforms, sessions and scheduled jobs in the database, and the last
errors. oscar status --all shows every profile in a few lines each
(model, gateway, platforms, counts, the last error), reading only their
files.
oscar gateway list shows the gateway of every profile: whether it runs,
its service unit and the state systemd reports (active, failed, …), the
gateway processes for that home, and the platforms it serves; --all adds
profiles with none of those. * marks the profile in use.
oscar doctor also checks the session database (oscar.db) and the
gateway's (gateway.db) with SQLite's quick_check. When one is damaged,
oscar sessions repair --dry-run shows what is still readable, and oscar sessions repair rebuilds it: the file is first copied as it is to
<name>.backup-<time>, then what is readable is copied into a fresh file
(VACUUM INTO, else row by row; indexes and the search index are rebuilt),
which takes the database's place once it passes the check; the damaged file
is kept as <name>.damaged-<time>. Nothing is deleted. --db state|gateway
picks one, --force rebuilds a healthy one too; a repair is refused while
this home's gateway runs.
Emergency stop
oscar pause stops this home's gateway from starting anything new: no new
chat turns on any platform (messages wait), no scheduled jobs, no board
cards; what runs finishes. oscar pause --resume lets everything go on. It
is the same switch as !pause all / !resume all in a chat: a file in
Oscar's home (paused), so a running gateway notices within seconds and it
holds across restarts. oscar status, oscar doctor and !status show it.
Keeping a gateway from crash-looping
- The service unit (
oscar gateway install) restarts the gateway when it fails (Restart=on-failure, 10 s apart), but at most five times within ten minutes (StartLimitBurst=5,StartLimitIntervalSec=600): then systemd stops trying and the unit isfailed(oscar gateway status,oscar gateway list).oscar gateway starttries again. Runoscar gateway installagain to add these lines to an older unit. - The liveness watchdog: the unit is
Type=notifywithWatchdogSec=120. The gateway tells systemd when it is ready (READY=1) and, while its runtime runs, pings every 60 seconds (WATCHDOG=1, written to$NOTIFY_SOCKET); a gateway that hangs without crashing stops pinging and systemd restarts it (within the limit above). It saysSTOPPING=1when it drains. Outside systemd nothing of this happens. An older unit (Type=simple) keeps working; runoscar gateway installagain to get the watchdog. - Inside the gateway, each platform runs under a supervisor: one that
fails is started again after a growing pause (5 s, doubling up to 5
minutes; a platform that ran for ten minutes starts over at 5 s), while
the other platforms keep answering. After five failures in a row (and
every five after that) the supervisor raises an alert: it is written to
the error log (
oscar logs errors) and posted to the home channel of every other platform that is up, and the pause goes straight to the longest. - The boot prompt (see Hooks) does not run again when the gateway restarts within ten minutes.
oscar doctor ends with a verdict and exits 1 when something keeps a
configured Oscar from working (a provider without its model, key or
sign-in; with --probe, a provider that does not answer), so a health check
can rely on it. Nothing set up yet is not a failure: doctor says to run
oscar setup. oscar doctor --fix first repairs what it safely can: file
modes (0600 for credentials.env, the other *.env files,
dashboard.token and the files under auth/, vault/ and audit/; 0700
for the home and those folders), missing folders, temporary files a crashed
process left behind, and the bundled skills (your edits are kept). It never
deletes anything else.
oscar prompt-size shows what every model request carries before the
conversation: the system prompt part by part and the tool definitions, in
estimated tokens, and the share of the model's window — useful when a
proxy or a small model has less room than you thought. It runs offline.
--safe-mode (any command) leaves out everything that extends Oscar —
plugins, hooks, MCP servers, Lua tools, project and extra skill folders — to
tell whether a problem is Oscar's or an extension's; approvals and the
sandbox are exactly as configured. --ignore-user-config runs on the
built-in defaults (keys still from the environment and credentials.env;
the approval and sandbox settings still apply) and never writes
config.toml; --ignore-rules leaves the workspace's context files out of
the prompt.
In a container
The repository's Dockerfile builds an image with the static binary, a
non-root user and a volume for $OSCAR_HOME; see Oscar in Docker
for building it, the first setup, a chat in a mounted project and the chat
gateways in a container.
Uninstalling
oscar uninstall --dry-run # what would go
oscar uninstall # asks; then asks about your data
oscar uninstall --yes --keep-data # scripted: binary and service, data kept
oscar uninstall --yes --delete-data # everything, without askingoscar uninstall removes the binary it runs from (and the .oscar.previous
that oscar update keeps beside it) and, when one is installed for this
home, the gateway service (stopped, disabled, unit removed). A service whose
unit names another home is left alone. Oscar's data — settings, keys,
memory, sessions, skills — stays unless you say otherwise: on a terminal it
asks (the default is no), and --delete-data deletes it without asking. For
the default profile that includes every other profile in ~/.oscar;
oscar backup first if you may want it back. With -p NAME the service
and the data are that profile's (the binary is the same for every profile).
oscar dump [--out FILE] [--lines N] — a report for bug reports: versions
and system, the profile, oscar config show and config check, oscar doctor, the gateway state and the last lines of errors.log and
gateway.log. Every line is masked (keys, tokens and every value in the
home's *.env files never appear). --out writes it mode 0600. Read it
before you share it.
Shell completion
oscar completion bash > ~/.local/share/bash-completion/completions/oscar
oscar completion zsh > "${fpath[1]}/_oscar"
oscar completion fish > ~/.config/fish/completions/oscar.fish
oscar completion elvish
oscar completion powershellSetup, part by part
oscar setup walks through the provider and then the optional parts, each
skippable: where commands run (host, the workspace sandbox, Docker with its
image, or SSH with its host, user, port, key file and remote workspace), the
tools every surface offers (and, if you like, one surface's own list), chat
gateways (Matrix homeserver and access token, or a password login that saves
only the token; Telegram and Discord bot tokens; allowed users), voice (text
to speech and speech to text backends and their keys), web search, the
browser, the memory provider, and installing the gateway service. Run again,
it shows what is set (secrets only as "set") and changes only what you
change: Enter keeps a value, - removes it. With a provider already set it
asks before changing it. oscar setup --quick asks only for the provider
and the model.
One part at a time: oscar setup sandbox|tools|gateways|voice|web|browser|memory|service (or provider;
terminal and toolsets are other names for sandbox and tools).
oscar setup --reset <part> puts that part's settings in config.toml back
to the defaults first (it asks on a terminal; keys in credentials.env are
kept — oscar config unset NAME removes one), then sets the part up again on
a terminal. --non-interactive never asks, even on a terminal. Without a
terminal, flags say what to set and secrets come on stdin as NAME=value
lines, never as arguments:
printf 'TELEGRAM_BOT_TOKEN=%s\n' "$TOKEN" |
oscar setup gateways --telegram-allowed 123456789 --secrets-stdin
oscar setup web --web-backend tavily --secrets-stdin < tavily.env
oscar setup voice --tts-backend openai --stt-backend groq --secrets-stdin < keys.env
oscar setup sandbox --sandbox-mode docker --docker-image debian:stable
oscar setup tools --toolsets files,shell,web
oscar setup --reset sandbox
oscar setup --quick --provider openrouter -m moonshotai/kimi-k3 --key-stdin < key.txtSecrets go to credentials.env (0600), everything else to config.toml.
After the gateways are saved, each changed platform is checked with one live
request (--skip-probe skips it); a failed check fails a scripted run.