Code as Usual documentation
Code as Usual gives a development team persistent, isolated Linux development environments that are reached from a browser or desktop IDE. The installation runs on infrastructure controlled by your organization.
The platform is deliberately general. A terminal may run a shell, editor, database client, build tool, web server, Codex, Claude Code or another program chosen by your organization. Code as Usual provides the environment around the program; it does not replace the program’s own login, protocol or license.
What you can do
- Create projects with approved tools, repositories and network access.
- Keep one durable set of files while opening several independent terminals.
- Upload, preview, edit, move, copy, download and archive working files.
- Work with the same checkout from the browser, Git CLI and VS Code.
- Expose a development web server through an authenticated private preview.
- Receive optional terminal notifications from installed integrations.
- Share a terminal read-only or hand durable work to another project member.
Start with a working result
If Code as Usual is not installed yet, begin with Install Code as Usual. The guide takes an installation administrator from a verified release archive to the first HTTPS login.
After installation, follow this order:
- Sign in and prepare the workspace.
- Create the first project.
- Create an environment and open a terminal.
- Add a repository and your personal Git credential, if the project uses Git.
Already using the application? Find the screen you need or use the search button at the top of this documentation.
Documentation follows the application
Task pages begin with an In the app path such as:
In the app:
Projects → project title → Settings → Git
The path uses the labels visible in the current release. Each page also says which role can perform the task and what result to expect. Conceptual and security details come after the working steps instead of replacing them.
This copy of the documentation belongs to the installed release and remains available without internet access.
Install Code as Usual
This is the first page for a new installation. It takes an installation administrator from a verified release archive to the first HTTPS login.
Who can do this: a Linux administrator with
sudoaccess to the target host and administrative access to DNS, TLS and PostgreSQL.
Result
When the procedure is complete:
- Code as Usual runs as the unprivileged
code-as-usualLinux account; - the application listens only on host loopback;
- the public application and private previews are reached through HTTPS;
- the first workspace administrator can sign in and enroll MFA; and
- this exact documentation release is available at
/docs/without internet access.
What the release includes
The release contains the private Java runtime, application artifacts, OCI images, database migrations, Windows connector and this documentation site. Do not install Java, Maven or Node on the host for Code as Usual.
The installer deliberately does not upgrade the operating system, format or mount a disk, alter DNS or firewall rules, request certificates, or enable a reverse-proxy site without the administrator reviewing that boundary.
The guided configuration records an installation default and ceiling for each
environment’s memory. The reviewed defaults are 1024 MiB and 4096 MiB. They
become the outer boundary for workspace policy; they do not reserve that amount
of host memory in advance. Advanced installations may set
CODE_AS_USUAL_ENVIRONMENT_MEMORY_DEFAULT_BYTES and
CODE_AS_USUAL_ENVIRONMENT_MEMORY_MAX_BYTES in web.env. Both are byte values,
must be at least 16 MiB, and the default must not exceed the maximum. Choose a
ceiling that accounts for the host’s memory and the number of environments
allowed to run concurrently.
The guided configuration also records a default and ceiling for Linux tasks
(processes and threads) per environment. The reviewed values are 1024 and
4096. Advanced installations may set
CODE_AS_USUAL_ENVIRONMENT_PROCESS_DEFAULT and
CODE_AS_USUAL_ENVIRONMENT_PROCESS_MAX; both must be whole numbers of at least
8 and the default must not exceed the maximum. These are Podman PIDs limits,
and JVM threads count toward them. Choose the ceiling with the host’s process
capacity and the maximum number of concurrent environments in mind.
1. Prepare the host
The supported first-installation shape is:
- supported Ubuntu x86-64 with systemd and cgroups v2;
- rootless Podman under a dedicated
code-as-usualaccount; - PostgreSQL reachable from the host;
- an existing persistent-data directory, preferably a dedicated filesystem;
- Apache or another reverse proxy terminating HTTPS;
- one application hostname and a wildcard private-preview domain.
Install only missing host components. Simulate the Ubuntu change first:
sudo apt-get update
sudo apt-get -s install podman postgresql-client apache2 \
curl openssl tar coreutils util-linux iproute2
Review the proposal, then remove -s to install the accepted packages. A
local PostgreSQL server additionally needs the postgresql package. The
application does not require Apache when an existing reverse proxy provides
the same HTTP and WebSocket contract.
Create the dedicated account if it does not already exist:
sudo useradd --create-home --shell /bin/bash code-as-usual
sudo loginctl enable-linger code-as-usual
sudo -iu code-as-usual podman info --format '{{.Host.Security.Rootless}}'
The last command must print true.
2. Prepare persistent storage
The recommended data root is a separately mounted filesystem at:
/srv/code-as-usual
Verify the actual filesystem before changing ownership:
findmnt -T /srv/code-as-usual
sudo chown code-as-usual:code-as-usual /srv/code-as-usual
sudo chmod 0700 /srv/code-as-usual
For a limited internal evaluation, the directory may share the operating system filesystem after the installer warning is explicitly accepted. Do not describe that layout as production storage. See Production storage.
3. Verify the release
Download both files from the same release:
code-as-usual-VERSION.tar.gz
code-as-usual-VERSION.tar.gz.sha256
Then verify and extract them in a directory readable by the application account:
cd /var/tmp
sha256sum --check code-as-usual-VERSION.tar.gz.sha256
tar -xzf code-as-usual-VERSION.tar.gz
cd code-as-usual-VERSION
./code-as-usual doctor
The checksum must report OK. Stop if it does not. The doctor is read-only;
resolve every INCOMPATIBLE result before continuing.
4. Prepare PostgreSQL
For a default local Ubuntu PostgreSQL installation, prepare the database through its local administrator socket:
sudo -u postgres /var/tmp/code-as-usual-VERSION/code-as-usual database setup \
--host /var/run/postgresql --admin-user postgres
Choose and retain two different passwords:
code_as_usual_owneris used only for schema installation and migration.code_as_usual_appis the restricted account used by the running service.
Store the owner password in the installation owner’s password manager. The application does not retain it. For external PostgreSQL, the guided installer can perform the same preparation when the database administrator uses normal password authentication.
5. Run the guided installer
Switch to the dedicated account and run the release you just verified:
sudo -iu code-as-usual
cd /var/tmp/code-as-usual-VERSION
./code-as-usual install
The guide checks the host again, asks one question at a time and shows one complete plan before writing. Important answers are:
- the real public HTTPS application URL, for example
https://dev.example.com; - the preview base URL, for example
https://preview.dev.example.com; /srv/code-as-usualas persistent data root;- the prepared PostgreSQL database and its two role passwords; and
- whether private tool logins in an environment survive runtime replacement.
The application URL and preview base are different. Entering
https://preview.dev.example.com as the application URL would make the guide
propose the incorrect preview.preview.dev.example.com preview domain.
The installer creates the first workspace administrator at the end. If it is interrupted after private configuration exists, do not delete anything; use:
./code-as-usual install --resume
6. Configure DNS and TLS
Create DNS records pointing to the server for:
dev.example.com
preview.dev.example.com
*.preview.dev.example.com
Obtain a certificate for the application hostname and a certificate covering
both the preview base and wildcard. DNS providers normally ask for the wildcard
record as *.preview.dev; the exact editor syntax is provider-specific.
7. Generate and enable the reverse proxy
As code-as-usual, generate reviewable Apache configuration from the installed
environment file:
~/.local/lib/code-as-usual/current/tools/render-apache-app-vhost.sh \
--environment "$HOME/.config/code-as-usual/web.env" \
--certificate /etc/letsencrypt/live/CERTIFICATE/fullchain.pem \
--private-key /etc/letsencrypt/live/CERTIFICATE/privkey.pem
~/.local/lib/code-as-usual/current/tools/render-apache-preview-vhost.sh \
--environment "$HOME/.config/code-as-usual/web.env" \
--certificate /etc/letsencrypt/live/CERTIFICATE/fullchain.pem \
--private-key /etc/letsencrypt/live/CERTIFICATE/privkey.pem
Exit the application account, copy the generated files to Apache, enable the required modules and sites, then validate before reload:
sudo a2enmod ssl proxy proxy_http headers
sudo cp /home/code-as-usual/.config/code-as-usual/generated/code-as-usual-app-apache.conf \
/etc/apache2/sites-available/code-as-usual-app.conf
sudo cp /home/code-as-usual/.config/code-as-usual/generated/code-as-usual-preview-apache.conf \
/etc/apache2/sites-available/code-as-usual-preview.conf
sudo a2ensite code-as-usual-app.conf code-as-usual-preview.conf
sudo apache2ctl configtest
sudo systemctl reload apache2
Run the reload only after Syntax OK. The filenames do not determine the
hostname; Apache selects the virtual host through ServerName inside the
generated file. Ports 8070–8072 remain on loopback and must not be exposed
publicly.
8. Verify and sign in
Check the service and local endpoint as the application account:
systemctl --user --no-pager status code-as-usual-web.service
curl --fail --show-error http://127.0.0.1:8070/login
Then open the public HTTPS URL, sign in with the first administrator and enroll the authenticator app by scanning the QR code.
Continue with First sign-in and workspace setup.
What the installer will not do
It never runs a general system upgrade, replaces shared Java, PostgreSQL or Apache installations, mounts a disk, changes the firewall or DNS, requests a certificate, or enables and reloads Apache on its own. Those remain visible server-owner decisions.
First sign-in and workspace setup
In the app: sign in → select the workspace in the left menu
Who can do this: the first administrator created by the installer, or a workspace administrator.
The installer creates the first workspace and administrator. The first browser session is used to make that workspace usable for a developer.
1. Finish your own sign-in setup
- Sign in with the administrator email and password created during install.
- Enroll an authenticator app when prompted. Scan the QR code and store the recovery information securely.
- Confirm that the expected workspace is selected at the top of the left menu.
2. Check the dashboard
In the app:
Dashboard
Review Things to review before creating development work. The dashboard links directly to unfinished setup, storage warnings and other items your role can resolve. A warning is not automatically a failure; open it to see the affected boundary and recommended action.
3. Add the people who will test the system
In the app:
Administration → Members & access
Create each person with their real email address and the minimum workspace role they require. Grant project access after the project exists. Do not share one login between several people: environments, credentials, audit records and notifications are user-owned.
4. Prepare at least one runtime package
In the app:
Administration → Environment catalog
For the first test, build and publish a small supported set such as Basic tools and Git, then add the language or build tool you need. A package must be both built and published before a project manager can select it.
5. Continue to the first project
Create the shared project definition next. The project selects which packages, network destinations and repositories may be used; each developer later gets their own environment and Git credential.
Continue with Create your first project.
Create your first project
In the app:
Projects → New project
Who can do this: a user with permission to create projects in the active workspace.
This quickstart creates enough shared configuration for one developer to open the first environment. It does not try to configure every catalog feature.
1. Create the project shell
- Open Projects.
- Select New project.
- Enter a name and create the project.
- Select the project title to open it.
2. Choose the first tools
- Select the project gear to open Project settings.
- Open Environment.
- Select the built and published packages required for the first test, such as Basic tools and Git.
- Select only the approved HTTPS destinations those tools actually need.
- Save the environment draft and wait for its profile to become ready.
3. Add a repository when required
Open Git in the same settings dialog and add the shared repository URL,
folder and default branch. Do not paste a personal token into the repository
definition. Each developer uses the account gear and adds their own token under
Account settings → Git credentials.
For the complete ownership and matching rules, read Git repositories and credentials.
4. Grant project access
Open Administration → Members & access, select the member and grant access
to this project. Use the ordinary project member role unless the person must
change the shared project definition.
Expected result: the developer can open the project and select Create environment.
Continue with Create your first environment.
Create your first environment
In the app:
Projects → project title → Create environment
Who can do this: a member of the project.
Before you begin
You need access to a project whose runtime profile is ready. A project manager must have selected and built its runtime packages before environments can be created.
Create the environment
- Open Projects and select the project title.
- Select Create environment.
- Give it a name that describes the branch or task.
- Review the runtime packages, repositories, outbound destinations, services and storage limits in the receipt.
- Choose your own Git credential for each protected repository, or select no app-managed credential.
- Confirm creation and wait until the environment is ready.
Expected result: the project view shows the new environment. Select its title to open the environment view. Terminals is initially empty; select New terminal only when you want an interactive shell.
The environment receives a private checkout and persistent working storage. Creating a terminal does not create another checkout. The environment remains available when its last terminal is closed and after the web application is restarted.
Open a terminal
Open the environment, select Terminals, then create or select a terminal.
Each terminal starts in /workspace. Changes made in one terminal immediately
appear in the environment’s other terminals, Files view and remote IDE.
Stop versus delete
- Stop ends runtime processes and connections but preserves all persistent files and repository changes.
- Delete is an explicit data operation. Review unpublished and non-repository work before confirming it.
Find your way around
The application is organized from the shared organization boundary down to the processes running for one person:
Workspace → Project → Environment → Terminal
Use the title of an item to open its view. Use the gear button for settings. The same pattern is used for projects and environments.
Dialogs
Dialogs keep their title and close control at the top and their action buttons at the bottom. When a form is taller than the available screen, only its content area scrolls. You can therefore review a long form without losing the close or save controls and without having to coordinate an inner and outer scrollbar.
In an action dialog, plain Enter activates its single visible primary
action. Enter continues to insert a newline in multiline editors. If several
equally applicable primary actions are visible, select the intended action
explicitly.
Main navigation
The left menu begins with the active Workspace selector. Changing it changes the projects, members, catalog and storage information shown in the rest of the application.
The normal workspace menu contains:
- Dashboard — work that needs attention, environment readiness and server health visible to your role.
- Projects — shared project definitions and your environments in them.
- Storage — persistent data you own or are allowed to inspect.
Workspace administrators also see Administration:
- Workspaces
- Members & access
- Environment catalog
- External services
- Terminal integrations
- Login email delivery, when the installation role permits it
At the bottom of the menu are Documentation, Account settings, the theme switcher and Sign out. Hover an icon to see its label. Account settings groups personal notification choices and personal Git credentials in separate tabs.
Project view
In the app:
Projects → project title
The project view lists environments available to you. Select an environment title to open it. Select the project gear to open Project settings.
Project settings are grouped into tabs:
- General — project name.
- File uploads — project upload limit within the workspace maximum.
- Environment — runtime packages, services and approved HTTPS destinations used by new profile revisions.
- Git — shared repository definitions only.
Only a project manager edits the shared settings. A project member may inspect
the Git definitions but manages credentials independently under
Account settings → Git credentials.
Environment view
In the app:
Projects → project title → environment title
An environment is your persistent development machine for one project. Its main tools are:
- Terminals — independent shells and programs against the same files.
- Files — the environment’s persistent working tree and repositories.
- Git — status for the same real checkouts used by terminals and IDEs.
The environment header also contains its settings and contextual actions such as preview, remote access, sharing or handover when they are available.
Why some screens depend on your role
The UI does not merely hide forbidden actions: the server checks workspace, project and ownership boundaries for every operation. If this guide mentions a button you cannot see, first check the required role printed at the beginning of that task page.
Choose your path
Code as Usual separates installation administration, workspace administration and daily development. A person may have more than one role, but each task keeps its own authorization boundary.
Developer
A developer works inside projects to which they have access. They create one or more personal environments, open terminals, manage files, bind personal Git credentials and start previews or remote IDE connections.
Start with Create your first environment.
Project manager
A project manager maintains the shared project definition: membership, repositories, runtime packages, services, network policy and safe defaults. The definition is shared; a user’s writable checkout is not.
See Members and project access and Git repositories and credentials.
Workspace administrator
A workspace administrator manages members, limits, available runtime packages, external services and approved outbound destinations. Publishing a package makes it selectable; it does not silently add it to existing projects.
Start with Runtime packages.
Installation administrator
The installation administrator controls the Linux host, application release, database, persistent volume, reverse proxy, TLS, backups, upgrades and the reusable server package library. This role is outside ordinary workspace administration. Granting a server package does not bypass the workspace administrator’s separate enable decision.
Start with Install on Ubuntu or Server package library.
Projects
Projects are shared definitions inside a workspace. They describe the tools, services, network access and repository destinations available for a piece of work. They do not contain one shared writable checkout for every developer.
Create your first project
In the app:
Projects → New project
Who can do this: a user with permission to create projects in the active workspace.
- Open Projects from the left menu.
- Select New project.
- Enter the project name and create it.
- Select the project title to open its project view.
- Select the gear button to open Project settings.
The project is now a shell. Complete the relevant settings before developers create environments.
Configure the project
In the app:
Projects → project title → Settings
Who can do this: a project manager.
Use the settings tabs in this order:
- General — verify the name.
- File uploads — inherit the workspace default unless this project needs a lower limit.
- Environment — select published runtime packages, external services and approved HTTPS destinations. Saving creates a new profile revision; it does not silently change running environments.
- Git — add shared repository definitions. Do not paste a personal token into a repository definition.
Personal Git credentials are not project settings. Each developer manages
their own token under Account settings → Git credentials. See
Git repositories and credentials.
Selecting PostgreSQL also requires a published PostgreSQL client runtime package. Code as Usual checks that requirement when the project profile is saved. See External services and PostgreSQL for the complete administrator and terminal flow.
Packages labelled Server library were created by an installation administrator and separately enabled by the workspace administrator. They use the same requirement and network review as workspace packages. Selecting one copies its exact immutable release and declared runtime destinations into the new project profile; it does not change an older profile.
Add members
In the app:
Administration → Members & access → user → Project access
Grant each person access to only the projects they need. Choose ordinary project membership for daily development and project manager only for people who maintain the shared project definition.
Open a project
Select the project title, not the gear button. The project view lists your environments and offers Create environment when the active profile is ready. Continue with Create your first environment.
Environments
An environment is one user’s persistent development machine for one project. It owns the writable files, repository checkouts, private tool home, runtime receipt, previews and remote-access grants. Several terminals may run inside the same environment without duplicating the files.
Open an environment
In the app:
Projects → project title → environment title
The environment view opens on Terminals. Use the environment navigation to switch between Terminals, Files and Git. These are three views of one environment, not separate copies.
The Terminals view keeps the terminal list near the top of the working area. When the environment has connected services, the compact Connected services summary shows their count; select View services to inspect the complete list and open the usage guide for an individual service. Pending Needs your attention signals are arranged as responsive cards, with several on one row when the available width permits. Selecting a terminal name opens that terminal, while Clear dismisses only that signal.
Copy terminal history
The terminal footer has two separate history controls:
- Scroll terminal output enters tmux scroll mode for navigating and searching the live terminal.
- Open copyable terminal history temporarily replaces the visible terminal surface with a copyable snapshot inside the same movable and resizable terminal window. The live xterm remains mounted underneath and continues to receive output.
An upward mouse-wheel or trackpad gesture over ordinary live shell output opens
the copyable snapshot directly and starts slightly above its latest line. The
gesture is not forwarded to tmux first, so the terminal does not redraw retained
history only to return to the current screen. A full-screen terminal program
instead receives the wheel gesture and controls its own history. When such a
program has not enabled terminal mouse reporting, bounded wheel movement is sent
as Page Up or Page Down instead of the arrow keys that browse prompt history.
That distinction matters for Codex, Claude Code and similar programs whose
complete conversation is held inside the application rather than tmux. Explicit
tmux scroll mode continues to own its own wheel navigation.
In the snapshot, select exactly the text you need and use the browser’s normal
copy command. Ctrl+A (or Cmd+A) while the history panel has focus selects
the complete captured snapshot, including lines outside the visible part;
Ctrl+C or Cmd+C copies the selection. Use Capture latest history to
replace the snapshot with a newer one, or Return to live terminal to reveal
xterm again. Terminal colour and control codes are removed from the copyable
plain text.
The snapshot is bounded, short-lived and does not alter the live terminal or its tmux scroll position. It represents the moment it was opened; use the refresh button to capture newer output. Only the terminal owner or a user with control access can open retained history. A read-only terminal share does not expose output retained before the share was granted.
Environment settings
In the app:
Projects → project title → environment title → Settings
Settings are grouped by purpose. They show both editable choices and the locked receipt that explains what this environment was created with. A later project revision is not applied silently; review and accept an update when it is offered.
Memory, processes and disk limits
In the app:
Environment → Settings → Storage & runtime
The receipt separates five limits:
- Memory is the hard container limit shared by applications, build tools and memory-backed temporary files.
- Processes and threads is the hard Linux task limit shared by all terminals and programs in the environment. Linux counts threads too, so a Java server may use many tasks even when it is one application process.
- Persistent working files covers
/workspace. Its current measured use is shown next to the selected budget and its files survive Stop and Start. - Temporary home/cache covers the private tool home for installations that use an ephemeral hard-limited home.
- Temporary process space covers
/tmpand/runand is cleared when the runtime stops.
Choose these values when creating an environment. The form shows the maximum allowed by the workspace and installation policy. To change an existing environment, stop it completely, open Storage & runtime, enter the new values and select Save limits. The new receipt is used on the next Start. Code as Usual does not resize a running container underneath its processes or terminals.
For a running environment, the header and this settings panel show the current task count against the recorded limit. The display warns at 70% and becomes critical at 90%. If the runtime provider cannot read a current value, it says unavailable rather than showing a misleading zero. The counter is measured from the environment container; it is not the host’s process count.
The persistent working-files value cannot be lowered below the files currently retained. Saving also fails if the environment starts, is handed over, loses project access or begins a runtime update while the new values are being checked. No files are deleted when a limit is changed.
If a shell or agent reports Cannot fork or Resource temporarily unavailable, stop unneeded application servers or agents. If those programs
are needed together, stop the environment and raise Processes and threads
within the maximum allowed by the workspace.
Discover installed tools
Every environment image contains an immutable package overview and one guide per selected package. From a terminal, use:
cau-env describe
cau-env packages
cau-env guide <package-key>
cau-env services
cau-env service <service-id>
cau-env json
The guides combine package-authored usage instructions with facts generated from the exact package plan used for this image: installed paths, exposed commands and environment variables. A package with no authored instructions still has those generated facts.
cau-env services reflects the services connected to the running environment,
not every service published in the workspace. Its first column is the service
ID accepted by cau-env service. The service guide lists all available
environment-variable names and adapter-authored instructions without printing
secret values.
AI agents run in the same environment and can read the same world-readable
files. CODE_AS_USUAL_AGENT_CONTEXT points to the overview,
CODE_AS_USUAL_PACKAGE_GUIDES to the guide directory and
CODE_AS_USUAL_SERVICE_GUIDES to the runtime directory for connected services,
CODE_AS_USUAL_ENVIRONMENT_MANIFEST to the machine-readable index. An agent
does not necessarily inspect arbitrary files automatically, so a generic first
instruction such as “read $CODE_AS_USUAL_AGENT_CONTEXT before changing the
tool setup” may still be needed unless that agent product provides a supported
startup-instruction mechanism. Code as Usual does not overwrite project-owned
AGENTS.md, CLAUDE.md or similar files, and notification hooks do not inject
prompts.
Stop, start and delete
- Stop ends running processes and active connections while preserving persistent files, repositories and configured persistent tool homes.
- Start restores the environment from those durable files and the recorded runtime configuration.
- Delete is a data operation. The confirmation must identify repository changes and non-repository files that will be lost.
Stopping is confirmed against the exact registered runtime. If cleanup is interrupted, the environment may show Stopping and offer Retry stopping. Use that action instead of assuming the container is gone. Code as Usual does not change the environment to Stopped until the provider confirms it, and it does not let an update proceed while the runtime state is uncertain.
A failed environment can be deleted only after any partial runtime has been safely released. The settings dialog says whether deletion is available and loads the retained-file and repository counts before enabling the permanent action. Deletion removes the persistent working files and private home; it is not the same operation as Stop.
Stopping one terminal does not stop the environment or its other terminals. Stopping the environment closes all of its terminal, preview and remote IDE connections.
After a server restart
Code as Usual does not automatically start every environment when the server or web service starts. Startup reconciliation removes the old recorded Podman stack for an environment that was running before the interruption and then shows the retained environment as Stopped. Select Start when you need it. Code as Usual recreates its container, private network, gateways and connected-service relays from the recorded runtime configuration.
Persistent workspace files, repositories and configured persistent tool homes remain available. Processes, terminal sessions, in-memory state and temporary files do not survive a server restart. If Code as Usual cannot confirm removal of the old provider stack, it shows the environment as Missing and offers Retry stopping instead of risking two runtime generations against the same files. This failure does not prevent the application or other environments from becoming available.
Apply a newer project runtime
In the app:
Environment → Settings → General → Update environment…
The action appears when the project has a newer active combination of packages, services or network policy. Confirming it stops the terminal processes and starts the same persistent working files and private home with the current project runtime. It does not alter repository branches or working files.
An update runs as a durable background operation. The page reports whether it is stopping the current runtime, starting the requested runtime or restoring the previous one. Provider and network delays do not impose a fixed failure deadline: Code as Usual retains the recorded phase and retries instead of leaving the environment in an unusable intermediate state. If the web service restarts, it resumes the recorded operation.
While the operation is active, use Stop update and restore previous runtime to cancel the requested change. Cancellation does not simply clear a status; Code as Usual continues until the previous immutable runtime is discovered and verified as running. Ordinary start and stop actions remain unavailable while that reconciliation owns the environment.
The operation has two completed outcomes. Either the requested runtime is verified as running, or the update fails or is cancelled and the previous runtime is verified as restored. Persistent working files and the private home remain the same in both cases.
Branches and multiple environments
Create separate environments when you need independent writable checkouts,
for example one environment on main and another on a feature branch. Open
several terminals inside one environment when the processes should operate on
the same files.
Terminals
In the app:
Projects → project title → environment title → Terminals
An environment may contain several independent terminals. They share files and network namespace but have separate processes, input and bounded histories.
Everyday use
- Select a terminal title to open it.
- Open several terminal windows when following concurrent processes.
- Rename or close terminals independently.
- Use the terminal footer for copy, paste, file insertion and scroll mode.
- Use configurable toolbar buttons for reviewed commands and terminal key combinations.
For every Codex, Claude or future integration selected in New terminal, the new terminal automatically receives a matching platform launch button. A terminal may select several integrations and then receives one button for each. The button uses the launch command from that exact adapter descriptor. For example, Codex starts with the CAU profile selected by the installed adapter instead of a version-specific command copied into the UI. A button appears while the integration is awaiting its first real trust event as well as after it becomes active; it disappears if that integration was not selected for this terminal or is disabled. Private and workspace buttons remain separately configurable.
In a modal action dialog, such as New terminal or Run command, plain
Enter runs the single visible primary action. Enter still inserts a newline
in multiline editors. If a dialog deliberately presents several equally
applicable primary actions, choose one explicitly instead of having the app
guess.
Terminal windows float over the environment view, so you can switch to Files or Git without closing the terminal. Use the title-bar controls to minimize, maximize or restore a window. Drag and resize a restored window on larger screens. Its restored position and size are saved in this browser for the exact project, environment and terminal identifiers; another terminal cannot inherit them. Saved geometry is clamped to the current viewport and is not used on narrow mobile layouts. Minimize and maximize do not recreate the PTY or its display history. When several windows overlap, the first click on a background window’s Minimize, Restore or other title-bar action both brings that window forward and performs the requested action; an extra activation click is not required.
On a phone or tablet, the browser can dismiss its on-screen keyboard without fully releasing xterm’s input focus. Tap the live terminal surface to reopen the keyboard. If the browser does not react to that tap, use the keyboard button in the terminal footer. Both actions only restore input focus to the same terminal; they do not reconnect it, recreate the PTY or resend text.
Closing a browser window disconnects the view; it does not necessarily stop
the terminal process. Stopping the environment closes all of its terminals.
Typing exit, logout or end-of-file is different: after the provider
confirms that the shell target ended, the terminal closes and disappears from
the active list. A lost browser connection alone is never treated as shell
exit.
If the live browser connection is interrupted while the window remains open,
Code as Usual reconnects the view automatically with progressively slower
retries. The terminal surface also shows a prominent Reconnect terminal
action, so a user can retry immediately instead of waiting. The browser and
server exchange a heartbeat while the terminal window exists; if a connection
stops carrying replies, the browser replaces that transport in the background.
The server-side session and its processes continue while the view is
disconnected. Reconnect restores the view of that same terminal; it does not
start a new shell. The reconnect action receives keyboard focus for the active
terminal, so pressing Enter is equivalent to selecting the button. A
disconnected background terminal does not take keyboard focus from another
terminal where you are working. Returning to a visible tab or restoring network
access triggers an immediate retry. Copyable terminal history remains available
while disconnected.
Opening, reconnecting or resizing a terminal can make tmux redraw its current screen. Code as Usual covers that transient redraw with a Preparing terminal indicator and reveals xterm after the queued output has been processed and painted. When a terminal is opened, the quiet-period check starts only after the first terminal output has reached the browser; opening the connection alone does not remove the cover. This presentation step does not load or change tmux history, recreate the PTY or pause the program running in the terminal.
Create a terminal
Select New terminal, enter a name and optionally choose one of the terminal integrations made available by the workspace. The new terminal uses the same environment files, repositories, runtime packages and network policy. It does not create another environment.
Files in terminal input
Use Add file to upload a local file or choose an existing environment file. Code as Usual inserts the contained environment path into terminal input. It does not reinterpret the input as an AI prompt. The program running in the terminal decides how to use the path.
Clipboard images are stored under the environment’s upload area. They remain ordinary files and can be managed through Files.
Paths below files/ and repositories/ are recognized in terminal output as
environment file links. This also works when a long path is visually wrapped,
including an edge wrap emitted as a real newline without xterm’s usual wrap
marker. Select a link to open the file in Files. Shift-click the link to
copy its stable environment-relative form, for example
files/my-files/test.txt, so it can be pasted into a terminal or prompt. The
same form is available through Copy path in the Files action menu.
Ctrl+Shift+C copies selected terminal text. Ctrl+Shift+V (or the platform’s
normal terminal paste shortcut) follows the browser and xterm native paste
event once. Code as Usual does not issue a second programmatic paste for the
same keyboard shortcut. The footer’s explicit Paste action remains useful
when browser clipboard permission or an image/PDF clipboard item requires the
richer clipboard API.
Scroll mode
Enable scroll mode from the terminal footer to inspect older terminal output. Disable it before resuming normal interactive input. Terminal history is bounded; durable information belongs in a file or source-control system. The History action captures the current bounded tmux history without changing the terminal. It is a viewing aid, not a permanent transcript or a replacement for application logs.
Scrolling upward with a mouse wheel or trackpad while the terminal is following
ordinary live shell output opens the same copyable History view automatically.
The first wheel movement is applied inside that snapshot, so the view does not
briefly replay tmux history and jump back to the latest screen. Scrolling remains
in tmux after explicit tmux scroll mode has been opened. When a full-screen
program owns the terminal display and has enabled mouse reporting, the wheel
gesture is sent to that program instead. If it owns the display without enabling
mouse reporting, Code as Usual converts bounded wheel movement to Page Up or
Page Down; it never converts it to the arrow keys used for prompt history.
Codex, Claude Code and similar programs can therefore navigate their own
conversation history, which does not exist in tmux’s captured scrollback.
Return to the live terminal with the History button or the close action in the
history header.
Some terminal programs use combinations that the browser reserves. For
example, Codex can show its full transcript with Ctrl+T, while a browser
normally opens a new tab for that combination.
Open the terminal toolbar settings, create a private button, and choose Send
a terminal input sequence. Add a key step, enter T, select Ctrl, give
the button a clear name such as Show full transcript, save it and add it to
the terminal or environment toolbar. Selecting the resulting button sends the
actual control character to the running terminal program; it does not invoke
the browser shortcut.
The same builder can combine several ordered steps: printable text, ordinary keys and Enter, Tab, Escape, Backspace or Delete. Key steps may use Ctrl, Alt/Option and Shift when that combination has a stable terminal representation. This avoids separate built-in buttons for individual tools. The sequence describes bytes sent to a remote PTY, not physical operating-system keys, so a Mac Command key cannot be sent. For shifted punctuation, enter the resulting character directly.
If tmux scroll mode is active, a configured input button first returns the terminal to live mode and waits for confirmation before sending the sequence, so it is not consumed by the history viewer.
Files
In the app:
Projects → project title → environment title → Files
The Files view belongs to an environment, not to one terminal. Browser terminals, remote IDEs and file operations all work on the same bytes.
Main areas
- Repositories contains the environment’s Git checkouts.
- Environment files contains durable files that are not yet part of a repository.
- Scratch is temporary working space and must not hold the only copy of important work.
Personal home and credential files are intentionally not exposed in the file browser.
Supported operations
You can create folders and files, upload one or several files, upload and
extract ZIP archives, preview common formats, edit text, move by drag and drop,
copy, rename, delete and download a selection as ZIP. Each file or folder’s
action menu also has Copy path. It copies the stable environment-relative
reference, such as files/my-files/test.txt or
repositories/application/src/Main.java, without adding a browser URL.
In an action dialog, plain Enter activates its single visible primary action.
This applies to operations such as Create folder, Rename, Move and
Copy. Multiline editors keep Enter as a newline, and the app does not guess
when more than one equally applicable primary action is visible.
The editor detects when the file changed on disk after it was opened. It will not silently overwrite changes made by a terminal, IDE or another process.
Sharing files with a team
There is no hidden shared writable project folder. Files become team work by placing them in a project repository and publishing them through normal Git. Files under Environment files remain private to the environment.
ZIP downloads exclude Git’s internal .git directories and temporary
provider data.
Open and edit a file
Select a file once to preview it. Supported images, PDF files and rendered Markdown open in their matching preview; text files use the bounded text editor. Select the edit icon for a supported text file. If another process changed the file after it was opened, the save is stopped and the UI asks you to reload instead of overwriting it silently.
Git repositories and credentials
Code as Usual deliberately separates the project’s repository definitions from each developer’s private credentials:
| Item | Owner | What it controls |
|---|---|---|
| Project repository | Project | URL, folder, default branch, whether it is required and the maximum authority an environment may request |
| Git credential | Signed-in user | One personal HTTPS username and token, limited to a host and optionally a repository path |
The shared repository definition never contains a personal secret. A personal credential never becomes a project credential and is never visible to another member.
Where each setting lives
Repository definitions are under:
In the app:
Projects → project title → Settings → Git
Personal credentials are under the account gear at the bottom of the main menu:
In the app:
Account settings → Git credentials
This separation is intentional. Creating or managing a project never asks an administrator to decide whether a token will be shared. Tokens are always personal. The server fetches the list from the authenticated user’s ID; even a workspace administrator cannot read, replace or revoke another person’s token. An ordinary project member may inspect the project’s repository definitions, but cannot edit them.
Add a repository to a project
In the app:
Projects → project title → Settings → Git → Project repositories
Who can do this: a project manager.
- Under Add repository, enter a human-readable Name.
- Enter the Folder in environment. A value such as
backendcreates the checkout at/workspace/repositories/backend. - Enter the complete HTTPS repository URL.
- Enter the Default branch used for new environments.
- Choose Maximum authority:
- Read only prevents an environment from receiving app-managed push authority for this repository.
- Push allowed permits, but does not force, a developer to choose a matching push credential when creating an environment.
- Keep Required in new environments selected when every environment must include the repository. Clear it when developers may omit it.
- Select Add repository.
Expected result: the repository appears in the shared list. No clone is made automatically. New environments can select the definition during creation; an existing running environment can add it explicitly from its Git view.
Add a repository to an existing environment
In the app:
Projects → project title → environment title → Git → Add repository
The environment must be running. The dialog offers the active repository definitions from the same project and your own matching Git credentials.
- Choose the Project repository definition.
- Review or change the Branch.
- Choose Read only or, when the project definition permits it, Push allowed.
- For a public read-only repository, keep No credential. Otherwise choose a matching personal credential.
- Select Add repository or press Enter.
A private repository still needs a personal credential when Read only is selected. A credential declared as push-capable may also be used for that read-only clone; the selected environment access remains read-only and Code as Usual removes the temporary clone credential afterward.
The clone runs as a repository-specific background operation. The environment stays running and its terminals remain usable. The Git view shows Adding…, then the normal repository status. A failed clone shows a safe explanation and can be retried from the same dialog with another branch, authority or credential.
The target is always the folder from the project definition under
/workspace/repositories; this operation cannot overwrite another registered
checkout. If the server process is interrupted after Git installed the working
tree, Code as Usual verifies the existing origin, branch and commit and
finishes the same receipt instead of cloning a duplicate.
The Git host must already be reachable through the running environment’s network policy. A host already used by another checkout is available. For a new host, add its HTTPS destination under Network access, update the environment, and then add the repository. This explicit order prevents a Git action from silently changing the environment’s network boundary.
Create your personal Git credential
In the app:
Account settings → Git credentials
Who can do this: every signed-in user.
The saved credential belongs to your user account. It can be offered for an accessible project repository only when the host, optional path scope and declared authority match.
- Create a personal access token at your Git provider. Give it no more authority than you need.
- Enter a Name that you will recognize, for example
GitHub read-only. - Enter the provider’s required Git username.
- Under Repository URL on the intended host, enter a real HTTPS repository URL. Code as Usual uses it to establish the exact host, not to add that repository to the project or bind the credential to it. You can reuse the credential for other repositories on the same Git server.
- Optionally enter a Path scope such as
teamorteam/project. Leave it empty to make the credential available to every matching repository on that Git server, subject to the permissions of the token itself. - Choose Declared token authority. This declaration must match the real provider token; it cannot reduce an over-privileged token at the provider.
- Paste the Personal access token and select Add credential.
Before anything is saved, Code as Usual starts a disposable isolated check, contacts that exact repository through the same restricted network path used by an environment and asks Git for its remote references. It neither clones nor changes the repository. The token is installed through standard input in the disposable runtime, never in a host command line, and the runtime is removed when the check finishes.
Expected result: Verified appears beside the credential, followed by its name, username, host, scope and declared authority. The token itself is encrypted and is never shown again. If authentication, provider SSO, DNS, network access or TLS fails, the dialog names that category and the credential is not saved.
Test a saved credential again
In the app:
Account settings → Git credentials → Test connection…
Enter one exact HTTPS repository URL that the credential should be able to read and select Test connection. This is useful after changing token permissions or organization authorization. The Verified/Test failed badge is the result of the current browser session; the provider remains authoritative and can revoke a token later.
If a protected environment cannot be created, first run this test against the same repository. Environment creation now distinguishes a rejected credential or provider SSO requirement from a missing branch, DNS failure, blocked network path and untrusted TLS certificate. Copy the complete visible message when asking an administrator for help; never send the token itself.
Host and path matching example
For a project repository at:
https://github.example.com/acme/backend.git
- a credential for
github.example.comwith no path scope matches; - a credential scoped to
acmematches; - a credential scoped to
acme/backendmatches; - a credential scoped to
another-teamdoes not appear as a choice.
Choose Git access when creating an environment
In the app:
Projects → project title → Create environment → Project repositories
For every included repository:
- Review or change the Initial branch.
- Choose Authority in this environment.
- Choose one of My credential entries that matches the repository and authority.
For Read only, a public repository may use No credential. If a read-only credential is selected, it is used for the initial clone and then removed from the runtime.
For Push allowed, a matching push credential is required. Push authority remains available to processes inside that environment. This includes shell scripts, build tools and coding agents that the user starts there. Choose push only when that is the intended boundary.
Creating another terminal in the same environment does not create a new clone or a different authority boundary. Creating another environment creates a separate checkout and lets you choose another branch or lower authority.
Work with the checkout
In the app:
Projects → project title → environment title
- Files shows the repository under
repositories. - Git shows local status and an optional remote comparison.
- Terminals and Open in VS Code operate on the same real checkout.
Code as Usual intentionally leaves commit, pull, merge and push semantics to ordinary Git. For example:
cd /workspace/repositories/backend
git status
git switch -c feature/my-change
git add .
git commit
git push
The web Git view is an overview, not a second version-control implementation. Repository hooks, branch protection and the external Git provider remain authoritative.
Refresh rereads the checkout that already exists inside the environment; it does not fetch, pull, merge, commit or push. Perform those operations in a terminal or IDE, where the real branch, index, credential authority and command result remain visible. Code as Usual never runs host-side Git against a user-writable checkout.
Revoke a credential
In the app:
Account settings → Git credentials → Revoke
Revoking prevents new environments from selecting the credential. It does not silently rewrite existing runtime files. If a provider token may be exposed or must stop working everywhere, revoke it at the Git provider as well, then stop or replace affected environments.
What transfers during handover
Repository branches, the index and working-tree files move with an accepted environment handover. The sender’s Git credentials do not. The recipient must select their own credential and authority before starting the received work.
Security boundary
The application does not run host-side Git against a user-writable checkout. App-assisted Git inspection runs inside the isolated environment with bounded arguments and output.
Web preview
In the app:
Projects → project title → environment title → Preview
Web preview opens a development server running inside an environment without publishing its container port directly on the host.
Start a preview
- Start the application in a terminal on a non-privileged port, listening on environment loopback or the address required by your framework.
- Open the environment’s preview action.
- Enter the application port.
- Open the generated private preview URL.
Expected result: the application opens on its own authenticated preview host. The port remains private to the environment and is not published directly on the Code as Usual server.
Two environments may use the same port. The preview is routed by environment, not by a globally allocated host port.
Access and lifetime
Preview access requires a current Code as Usual browser login. Logging out revokes previews opened by that login. Stopping the environment closes all its preview relays. Closing the terminal that started the server does not by itself revoke the preview if the process continues running.
The installation administrator must configure wildcard DNS and TLS for the preview base domain.
Open in a desktop IDE
In the app:
Projects → project title → environment title → Remote access
Code as Usual can connect a desktop SSH-capable tool to an environment through the application’s authenticated HTTPS channel. The environment does not expose a public SSH port and the connection never opens a host shell.
The desktop connector keeps an otherwise idle encrypted tunnel alive. You may close the Code as Usual browser tab after opening the desktop terminal; the browser does not have to remain active. Logging out, stopping the environment, revoking access or reaching the displayed grant expiry still closes the remote connection deliberately.
First use on a Windows computer
- Open Remote access in an environment.
- Download and install the Code as Usual desktop connector offered by the application.
- Pair the connector with your current application login.
- Confirm the displayed device and connection details.
The initial connector may be unsigned in an internal pilot. Verify its published SHA-256 before accepting a Windows SmartScreen warning.
Open VS Code
Select Open in VS Code from the environment. VS Code connects through the
paired desktop connector and opens /workspace. Files created there appear
immediately in browser Files and terminals.
Remote grants belong to one user, device, login and environment. Stopping the environment or revoking access closes active SSH, SFTP and IDE channels.
Notifications
Code as Usual can notify you when an installed terminal integration reports that a program has stopped or needs attention. Integrations are optional runtime packages; the platform remains usable without them.
Enable delivery
In the app: bottom of the left menu → Notification settings
Open notification settings from your user controls. Depending on the workspace configuration, you may select Web Push, email, both or neither.
Web Push permission is granted by your browser for the current application origin. Email delivery requires a verified address and workspace SMTP configuration.
Terminal integrations
Provider-specific adapters are enabled explicitly for an environment or terminal. They consume documented hooks exposed by the installed program. Code as Usual does not scrape or reinterpret terminal output as an AI protocol.
Enabling an integration installs its exact published adapter version; it does not change the provider’s ordinary command. For Codex adapter 1.1, create the terminal with the integration and launch the dedicated profile exactly as the terminal dialog shows:
codex --profile code-as-usual-notifications-networked --no-alt-screen --no-daemon
Plain codex does not load that profile. The profile still uses Codex’s own
hook review/trust flow. Its inner sandbox may use the network, but the enclosing
environment can still reach only the services and destinations approved for
that environment.
Workspace approval, environment installation and terminal activation are separate choices. Updating an adapter does not rewrite the version recorded on older attention events. Disabling or replacing an integration retains bounded historical event origin for audit while revoking new terminal event leases.
Attention state is summarized per terminal. Opening the relevant terminal clears transient hook attention instead of accumulating hundreds of old items. Dashboard, project and environment views point to the affected terminal.
Collaboration and handover
Code as Usual provides two different collaboration flows.
Read-only terminal sharing
In the app: open the terminal → Share terminal
The terminal owner may grant another active project member a read-only view. The viewer sees terminal output but cannot send input. The owner can revoke the grant at any time, and access removal closes an already open viewer connection.
Read-only sharing does not share personal credentials or grant access to other environments.
Hand over work
In the app: open the environment → Hand over
An environment owner may offer durable work to another member of the same project. Sending or withdrawing an offer does not stop the source environment; the owner may continue working until the recipient accepts.
Acceptance is the irreversible boundary:
- The source runtime and active connections stop.
- The persistent working tree moves to a new recipient-owned environment.
- Repository branches, index, tracked, untracked and unstaged files remain unchanged.
- The recipient binds their own Git credentials and starts the environment explicitly.
Personal home, .codex, .claude, tokens, terminal history, running processes,
provider conversations and desktop grants never transfer. The owner may add a
note or a HANDOVER.md file, but Code as Usual does not manufacture an AI-chat
summary.
Set up a workspace
A workspace is the organization boundary used by the left-menu selector. Its members, projects, package catalog, external services, notification delivery and storage policies are not shared with another workspace.
Open workspace administration
In the app:
Administration → Workspaces
Who can do this: a workspace administrator. Creating additional workspaces also requires the installation-level permission shown by the presence of New workspace.
Select a workspace title to make it active. The Active badge confirms which workspace the rest of the left menu is showing.
The icon buttons on an administered workspace open:
- Notification delivery settings — allowed Web Push and attention-email channels plus the workspace SMTP server.
- File upload settings — workspace maximum and default per project.
- Environment resources and storage — default and maximum memory, processes and threads, persistent working files, temporary home/cache and temporary process space, plus retained capacity and inactivity warnings.
Hover an icon to see its full action name.
Recommended first-time order
- Open Workspaces and review upload, storage and notification settings.
- Open Members & access and create individual user accounts.
- Open Environment catalog, build the required packages and publish them.
- Open External services and register only services required by projects. See External services and PostgreSQL.
- Open Terminal integrations and allow only reviewed adapter versions.
- Open Projects, create the first project and select from the resources prepared above.
Settings affect new work deliberately
Workspace defaults do not silently rewrite existing projects or running environments. New environments begin with the effective default and may choose memory/storage values in whole MiB and a whole-number Linux task limit up to the corresponding workspace maximum. An owner may change an existing environment’s memory, process/thread and storage receipt only while it is fully stopped. Lowering a storage or upload limit never deletes retained work, and a persistent working-files limit cannot be saved below measured use.
The process/thread value is a Podman PIDs limit for one environment, not for each terminal. JVM threads count toward it. Choose a workspace default that supports the intended build tools and application servers without giving one environment unnecessary access to the host’s total process capacity.
Workspace values may narrow but never exceed the installation ceiling. Leave a field empty to inherit the installation value. A default must fit inside its corresponding maximum.
Where login email is configured
Workspace notification delivery is for terminal-attention messages. Login
and security email is installation-wide and appears separately as
Administration → Login email delivery to authorized installation
administrators.
Members and project access
In the app:
Administration → Members & access
Who can do this: a workspace administrator.
A workspace is the tenant boundary, but workspace membership alone does not grant access to every project.
Add a member
- Select New member.
- Enter the unique email address and display name.
- Choose the minimum workspace role required.
- Select only the projects this person needs and choose the project role.
- Complete the local sign-in setup shown by the dialog.
The member completes MFA setup after their first password login. Email codes are available only when login email delivery has been configured.
Project roles distinguish ordinary members from project managers. Project managers may change shared project configuration; members may create and use their own environments from the active profile.
Manage account security
Open a member and use Account security to perform either of these actions:
- Set new password replaces the local password immediately and ends all of that member’s open application sessions. Share the replacement only through a secure channel; it is hashed immediately and is never displayed again.
- Disable account blocks sign-in and ends open application sessions. The member remains visible in the list with a Disabled badge, so an administrator can later choose Enable account without recreating roles or project grants.
Disabling an account does not delete persistent files or environments. Stop or clean up retained resources separately when that is the intended outcome. An administrator cannot disable their own account from this panel, and the last enabled workspace administrator is protected from accidental lockout.
These workspace tools manage accounts that belong only to the selected workspace. An account shared by multiple workspaces requires installation-level administration so that one workspace administrator cannot affect another workspace’s identity lifecycle.
Revoke access
Removing project or workspace access prevents new operations and actively closes current browser terminal, preview, SSH/SFTP, IDE and transfer grants. Persistent work is not silently deleted. Administrators can inspect retained storage and follow the explicit cleanup or recovery flow.
Audit principle
Audit records identify the actor, workspace, project, environment and action. They must not contain terminal output, file contents, passwords, tokens or notification payload secrets.
Environment packages
In the app:
Administration → Environment catalog
Who can do this: a workspace administrator.
Runtime packages are immutable, administrator-approved additions to a project’s base development environment. Examples include basic terminal tools, Git, JDK, Maven, Node.js, Python and database clients.
This page covers workspace-owned packages created from the standard catalog. An installation administrator can also create a reusable reviewed release in the Server package library. Such a release must be granted to this workspace and then enabled here before projects can select it.
Package lifecycle
- Select New package.
- Choose a registered Template and one of its supported Version entries. The browser cannot submit an arbitrary build command.
- Enter a name and description.
- Review Default network access. Recommended standard destinations are preselected; clear them for offline use or when the organization uses an internal mirror.
- Select Create draft.
- In the Needs attention group, select Build. The package moves to Building now and shows a busy indicator while the background job runs.
- When the validated artifact is ready, select Publish.
Expected result: the package moves to Available to projects and a project
manager can select it in Project settings → Environment.
If a build fails, the row remains visible with its error summary and the action becomes Build again. Fix the package settings before retrying.
Published artifacts are identified by OCI digest. Editing a definition creates a new version; it does not alter running environments silently.
Package versions from the maintained catalog
The selectable versions for maintained environment packages are not frozen in the Code as Usual application binary. They are part of the signed maintained registry, together with compatible declarative terminal-adapter artifacts. An installation checks that registry in the background and keeps the latest completely verified snapshot on local disk. Startup and normal use never depend on the registry being reachable; a release-matched bundled snapshot is the final offline fallback.
Download the catalog format 1 JSON Schema.
Each catalog entry selects one exact upstream artifact for one platform and points to a checksum-verified package manifest. A version marked Recommended is selected by default, while earlier listed versions remain available. Creating or updating a package never silently changes an existing project or environment: an administrator still builds and publishes the chosen version, and the project must explicitly select it.
Codex CLI and Claude Code use this catalog. At publication time it includes Codex 0.166.0 and 0.171.0, plus Claude Code 2.1.312 and 2.1.322. Codex adapter 1.2.0 is registered for both listed Codex versions, and Claude adapter 1.0.0 is registered for both listed Claude versions. Package recommendation and adapter compatibility are separate signed registry data: a later provider version can be added after testing without rebuilding the existing adapter or publishing a new Code as Usual binary release. The application accepts catalog releases only for an already registered environment-package type; this catalog cannot create arbitrary server-library packages or replace a package key.
Prepare common tools
Select Set up standard packages… to create curated drafts for a chosen set of common tools. The dialog creates drafts; it does not publish them. Build, validate and publish each package from the catalog list so the administrator can see exactly which artifacts become available.
Standard packages
The setup guide can create curated drafts for common tools. Administrators still review, build and publish each package. Proprietary clients whose redistribution terms require customer acceptance are not silently downloaded or accepted by Code as Usual.
Projects and updates
A project manager selects published packages for a project runtime profile. Changing the selection builds a new profile revision. Existing environments show an available update and change only after the owner confirms it.
Enable a package granted by the server administrator
Under Environment catalog, find the server package below the workspace catalog and select Enable for projects. A grant alone is not approval to use the package. Disable removes it from future selections without changing historical project profiles or running environments.
Archive or restore a package
Open Settings on the package and select Lifecycle. Archive package removes it from future project selection while keeping historical project and environment receipts valid. An archived package can be restored when its artifact is still supported. No existing environment is silently rebuilt.
External services
An external service is a workspace-owned connection to software that Code as Usual does not install or manage. Built-in fixed-target templates are available for PostgreSQL, MySQL, MariaDB and Redis. The service remains on the customer’s server; Code as Usual controls which project environments receive a private route and credentials for it.
Outbound HTTPS destinations are not external services. Register and publish those separately under Administration → Network access.
Before you register PostgreSQL
In the app:
Administration → Environment catalog
Build and publish the PostgreSQL client package if developers should use
psql in terminals. It is optional: applications can use the service’s JDBC,
host, port and credential variables without installing psql. The external
service controls the connection and does not install client programs.
Create a dedicated PostgreSQL account and database outside Code as Usual. Give that account only the database permissions required by the projects that will use the service.
Register and publish a service
In the app:
Administration → External services → Register service
Who can do this: a workspace administrator.
- Select the required service template.
- Enter a stable service key and a recognizable name.
- Enter the server name or IP address and TCP port.
localhostmeans the Code as Usual host, not the environment container. - Choose the TLS mode used by that service.
- Enter the database, dedicated username and password. For Redis, enter the database index and ACL username expected by that installation.
- Save the draft.
- For PostgreSQL, select Test connection and wait for it to succeed.
- Select Publish.
The PostgreSQL connection test is read-only: it opens and validates a login but does not run application SQL. MySQL, MariaDB and Redis drafts currently validate their fixed-target configuration and encrypted credential, but do not perform a product-protocol login during publication. The password is encrypted before it is stored and is never returned to the browser. A failed draft can be corrected by deleting it and registering a new draft.
Publishing is deliberately separate from registration. A project cannot select an unpublished service; PostgreSQL must additionally pass its connection test.
Give a project access
In the app:
Projects → project title → Settings → Environment
- Select the published external service.
- Optionally select the published PostgreSQL client package if developers
should connect interactively with
psql. - Save the new project profile revision.
- Create a new environment from that profile.
Changing a workspace service or project profile never changes a running environment silently. Every environment stores a receipt for the exact service revision and credential version it received.
Find the connection names
Code as Usual derives a stable variable prefix from the service key. For
example, the key development-db becomes:
CAU_SERVICE_DEVELOPMENT_DB
The app shows this prefix and every available variable in three places:
- Administration → External services → Usage… shows the names that a future attached environment will receive.
- Project → Environment → Connected services → Usage… shows the exact services attached to that environment.
- The database icon in an open terminal’s footer opens the same Usage dialog
and can insert the
psqlcommand directly into that terminal.
The UI deliberately shows variable names, not secret values. You do not need to find or inspect a hidden file to discover how to use a service.
The same information is available inside the running environment for people, scripts and AI agents:
cau-env services
cau-env service <service-id>
The first command lists only services connected to that environment. Use the ID from its first column with the second command. The resulting guide explains the available variables and connection workflow but never prints passwords or resolved secret values.
Variables shared by credentialed services
The following variables are available for PostgreSQL, MySQL, MariaDB and Redis.
Replace CAU_SERVICE_DEVELOPMENT_DB with the prefix shown in Usage….
| Variable | Purpose |
|---|---|
CAU_SERVICE_DEVELOPMENT_DB_TYPE | Registered service type |
CAU_SERVICE_DEVELOPMENT_DB_HOST | Private relay host an application in the environment must use |
CAU_SERVICE_DEVELOPMENT_DB_PORT | Private relay port |
CAU_SERVICE_DEVELOPMENT_DB_DATABASE | Database name or Redis database index |
CAU_SERVICE_DEVELOPMENT_DB_USER | Database user or Redis ACL username |
CAU_SERVICE_DEVELOPMENT_DB_PASSWORD_FILE | Path to the private read-only password file |
CAU_SERVICE_DEVELOPMENT_DB_PASSWORD | Password value for clients that cannot read a file |
CAU_SERVICE_DEVELOPMENT_DB_TLS_MODE | Registered TLS policy |
CAU_SERVICE_DEVELOPMENT_DB_BINDING_DIR | Private directory containing generated files |
Configure the selected client or application with the generated relay host and port, not the original server address. Client option names differ between products and versions, so apply the shown TLS policy using that client’s own settings. The application remains responsible for supplying its client library or JDBC driver.
Prefer _PASSWORD_FILE when a program supports it. _PASSWORD exists for
frameworks that only accept an environment variable, but environment variables
are easier for another process in the same environment to inspect. Never print
either form in terminal output or logs.
Use PostgreSQL in a terminal
Open Connected services → Usage… and choose Insert psql command. Code as Usual inserts, but does not execute, a command such as:
PGSERVICEFILE="$CAU_SERVICE_DEVELOPMENT_DB_PGSERVICEFILE" \
PGSERVICE=code_as_usual psql
Review the command and press Enter. Copy psql command is available when the Usage dialog is opened outside a terminal. These actions require the optional PostgreSQL client runtime package; application variables do not.
The complete PostgreSQL binding is also available to ordinary shell scripts:
| Variable | Purpose |
|---|---|
CAU_SERVICE_DEVELOPMENT_DB_TYPE | Service type; currently postgresql |
CAU_SERVICE_DEVELOPMENT_DB_JDBC_URL | Complete JDBC URL through the private relay |
CAU_SERVICE_DEVELOPMENT_DB_HOST | Host name an application in the environment must use |
CAU_SERVICE_DEVELOPMENT_DB_PORT | Relay port |
CAU_SERVICE_DEVELOPMENT_DB_DATABASE | Registered database name |
CAU_SERVICE_DEVELOPMENT_DB_USER | Registered database user |
CAU_SERVICE_DEVELOPMENT_DB_PASSWORD_FILE | Path to the private read-only password file |
CAU_SERVICE_DEVELOPMENT_DB_PASSWORD | Password value for tools that cannot read a file |
CAU_SERVICE_DEVELOPMENT_DB_TLS_MODE | Registered TLS policy |
CAU_SERVICE_DEVELOPMENT_DB_PGSERVICEFILE | Path to the generated pg_service.conf |
CAU_SERVICE_DEVELOPMENT_DB_PGPASSFILE | Path to the generated pgpass |
CAU_SERVICE_DEVELOPMENT_DB_BINDING_DIR | Private directory containing the generated files |
Replace CAU_SERVICE_DEVELOPMENT_DB with the prefix shown in the Usage dialog.
Use PostgreSQL from an application
The same binding is available to every terminal and program in the environment. For Java, open Usage… and choose Copy Java example, or use:
String jdbcUrl = System.getenv("CAU_SERVICE_DEVELOPMENT_DB_JDBC_URL");
String user = System.getenv("CAU_SERVICE_DEVELOPMENT_DB_USER");
String passwordFile = System.getenv("CAU_SERVICE_DEVELOPMENT_DB_PASSWORD_FILE");
String password = passwordFile != null
? Files.readString(Path.of(passwordFile))
: System.getenv("CAU_SERVICE_DEVELOPMENT_DB_PASSWORD");
Pass jdbcUrl, user and password to the application’s PostgreSQL driver.
The application must still include its own JDBC driver; the external service
provides the connection, not Java dependencies.
The generated values point to the environment’s private relay. Do not save resolved values in source code, project configuration or Git. A running environment created before a service was selected does not change silently; create a new environment from the updated project profile. If an application release adds these variables to an already attached environment, stop and resume that environment once so its runtime can be rebuilt with the binding.
Security boundary
- The environment gets no direct mount of the database host filesystem.
- The relay can reach only the registered server and port.
- The environment sees a relay address, while TLS still verifies the original registered server name.
- Credentials are not shown in the UI, logs or audit messages.
_PASSWORDis present only inside an authorized environment for compatibility;_PASSWORD_FILEpoints to the same credential in a private read-only file.- A program running inside an authorized environment can read and use the credential. The relay is a network boundary, not a claim that credentials can be hidden from the client program that must authenticate.
- Deleting a draft is allowed. Published or historically attached services are retained for audit and safe environment resume.
The installation’s external-service encryption key is part of the private application configuration and must be included in backup and restore. Losing that key makes stored service credentials unreadable.
Network destinations
In the app (administration):
Administration → Network access
In the app (project selection):
Projects → project title → Settings → Environment
Who can do this: a workspace administrator registers and publishes exact destinations. A project manager selects from the published destinations.
Environment egress is denied unless the active project profile explicitly allows a destination. This makes outbound access visible and reviewable rather than granting every terminal unrestricted internet access.
Suggested destinations
Runtime templates may suggest known endpoints required by their tools, such as Maven Central for Maven or the npm registry for Node projects. The administrator chooses which suggestions to publish. Selecting a package never silently opens all suggested network access.
Custom HTTPS destinations can be added for self-hosted Git servers, package mirrors and other approved services. Select Add HTTPS destination, enter one exact host, save the draft and publish it. Network destinations do not contain application credentials and are intentionally kept separate from databases and other fixed resources under External services.
Effective policy
The project profile records the exact allowed destinations. The environment’s egress gateway enforces that receipt. A package, service or project change does not mutate an already running environment; the user must accept an environment update.
Database and other fixed-target services use their service-specific connection contract rather than a general unrestricted network grant.
Storage and system status
In the app:
Dashboardfor current health;Storagefor environment usage;Administration → Workspacesfor workspace limits.
Workspace and installation administrators need visibility before disk pressure becomes an outage.
What System status shows
- persistent usage by workspace, project, environment and owner;
- age and running/stopped state;
- recent storage warnings and incidents;
- host filesystem capacity and application data-root health;
- CPU and memory signals used for operational diagnosis.
Code as Usual attributes storage to application identities without recording terminal commands. If investigation is required, administrators should contact the owner and request access instead of introducing hidden terminal recording.
The two totals at the top are aggregate limits, not one environment’s limit:
- visible persistent files compares the measured working files visible in the selected workspace with that workspace’s retained-storage budget;
- my retained files compares the signed-in user’s measured files with that user’s retained-storage budget; and
- each environment card separately compares that environment’s measured files
with its own creation receipt, for example
502.3 MB of 10.0 GB.
All values are stored as bytes and formatted as B, KB, MB or GB only for display. A 10 GB per-environment receipt must therefore never appear as 1024 GB or as the workspace aggregate. These budgets prevent new growth when enforced by the application; they are not kernel filesystem quotas and never authorize automatic deletion.
Memory is not part of these retained-storage totals. Each environment’s memory
value is a hard runtime limit recorded separately under
Environment → Settings → Storage & runtime. Workspace administrators set its
default and maximum under Environment resources and storage.
The same settings contain the environment’s Processes and threads limit.
For running environments, Code as Usual reads the current Linux task count
from Podman and shows current / limit in the environment list, header and
settings. Warning color begins at 70% and critical color at 90%. JVM threads
are tasks, so this counter is the useful one when several Tomcat instances,
builds or AI agents run together. An unavailable measurement is reported as
unavailable and is not interpreted as zero.
Emergency behavior
Storage warning thresholds are configurable. At critical levels the platform may refuse new data-producing work while preserving cleanup operations such as delete and download. It never automatically deletes unpublished work.
For production-like use, place the persistent data root on a dedicated filesystem. See Production storage.
Email and Web Push
In the app:
Administration → Workspaces → Notification delivery settings
Who can do this: a workspace administrator. Login/security email is a separate installation setting under
Administration → Login email delivery.
Workspace administrators configure the delivery methods offered to members. Users decide whether they want Web Push, email, both or neither.
Web Push
Web Push requires installation VAPID keys and the application’s exact public HTTPS origin. The installation creates and retains these secrets across upgrades. Users then grant browser permission from their user menu.
Changing the public origin requires users to subscribe again because browser push subscriptions are origin-bound.
Configure the workspace SMTP host, port, TLS mode, sender and authentication. Credentials are encrypted at rest. Use the provider’s supported authentication method or an application-specific password; do not weaken the provider account to permit legacy password login.
Send a test message before enabling email delivery for members. Rotation must replace the stored credential without writing it to logs or audit records.
Maintained registry
In the app:
Server package library → Maintained package and adapter registry
Who can do this: an installation administrator.
The maintained registry lets a Code as Usual installation learn about reviewed environment-package versions and compatible declarative terminal-adapter artifacts without waiting for a new application release. It is not a plugin store and cannot supply Java classes, shell scripts or provider lifecycle code. That executable logic remains part of the reviewed Code as Usual provider.
What happens during an update
Code as Usual starts immediately from a local snapshot and performs the remote
check in the background. The default endpoint is
https://stefilcoder.ledgecode.com/code-as-usual-registry/v1/registry-index.json.
An operator can replace it with the fixed HTTPS URL in
CODE_AS_USUAL_REGISTRY_URL, and can replace the pinned Ed25519 public key with
CODE_AS_USUAL_REGISTRY_PUBLIC_KEY for a separately maintained registry.
For a new revision the server:
- verifies the Ed25519 signature over the exact index bytes;
- rejects an older revision or changed bytes under the same revision number;
- downloads every declared asset from the same fixed HTTPS origin;
- verifies every SHA-256 and parses the complete package catalog, immutable adapter artifacts and separate adapter-compatibility registrations in a staging directory;
- atomically switches the local current pointer only after all checks pass.
The cache is stored below the installation data root in registry/. The
current and immediately preceding verified snapshots are retained. If the
network, signature, checksum or format check fails, the active snapshot is not
changed. If no downloaded snapshot is usable, the copy bundled with the
installed release is used. Registry availability is therefore never required
to start the web application or use versions already known locally.
What an update does not change
A registry update only changes which reviewed versions an administrator may choose. It does not build a package, publish it into a workspace, change a project profile, update an environment or enable a terminal integration. Those existing approval steps remain explicit.
The first format keeps adapter identity and provider compatibility separate. An adapter artifact is identified by adapter key, adapter version and digest. A compatibility registration binds that exact digest to the provider versions that have actually been tested. A later registry revision can therefore add, for example, Codex 0.172 or a newer Claude Code version to an existing adapter without rebuilding the adapter or releasing a new CAU binary. The provider still reads the installed program’s real version and runs the adapter’s real validation before activation.
Compatibility rules can contain exact alternatives such as
=0.166.0 || =0.171.0, or reviewed ranges. Adding an untested package version
to the package catalog does not make it adapter-compatible automatically.
When a verified snapshot becomes current, CAU synchronizes the new rule onto
the existing adapter catalog row; no SQL migration or ORM regeneration is
needed for each newly approved provider version.
Publication contract
The public files are under
downloads/registry. The
format 1 JSON Schema
documents the publication structure. A publisher must increase
registryVersion, update all asset hashes and sign the exact index with the
offline Ed25519 private key by running:
CODE_AS_USUAL_REGISTRY_SIGNING_KEY=/absolute/private.pem \
tools/sign-maintained-registry.sh
The private key must never be stored in the repository, a CAU release or the public web root. An already published revision is immutable; a correction is a new, higher revision.
Server package library
In the app:
Server package library
Who can do this: an installation administrator. A workspace administrator performs the separate workspace enable step.
Use the server package library when a reusable tool is not available in the workspace’s standard catalog. The library creates composable runtime packages; it does not accept arbitrary images, Containerfiles or shell scripts and it does not contain product-specific package logic.
Maintained package and adapter registry
The registry card at the top shows the active registry revision, whether it came from the downloaded last-known-good cache or the release bundle, and the latest update-check result. Check for updates starts a background check; it does not block this page and does not modify any project or environment.
An update is accepted only after the signed index, every declared SHA-256 and the complete package and adapter snapshot have passed validation. A failed or unreachable check leaves the current snapshot active. See Maintained registry for the security, offline and publication contract.
Create a package with the guide
Select Create package. The dialog is a four-step guide rather than one long form:
- Source — name the release and describe where its installation files come from.
- Runtime — state what the package provides, requires and may reach over HTTPS after installation.
- Validation — define a small deterministic check that proves this package installed correctly by itself.
- Review — compare a readable summary with the exact server-generated build plan before saving.
Only the current step’s fields and help are shown. Continue checks required values before advancing. On step 3, Check and review asks the server to normalize the complete definition; nothing has been saved yet. Save draft becomes available only on the review step. Saving a draft does not build an image or make the package available to projects.
The heading and navigation remain visible while the guide’s content scrolls. The dialog has no horizontal page scroll; long plan values wrap inside the plan area.
Describe the runtime contract
The Runtime step is the contract between this package and every project that selects it. It has three structured lists; none of them is product-specific.
- Environment variables are values the package contributes to the final
project environment, for example
JAVA_HOME,CATALINA_HOMEor a variable used by an internal tool. Names and values are validated. If two selected packages assign different values to the same name, the project image build fails instead of silently choosing one. - Provides names capabilities other packages may depend on, such as
java.runtime,java.sdkorservlet.container. The capability name is a stable contract; the optional version describes what this release provides. - Depends on names required capabilities. A dependency may accept any
version, one exact version such as
21, or a range such as>=17 <22. It points to a capability, never to a product name or filesystem path.
The guide offers package variables that can be inserted anywhere in an environment-variable value:
| Package variable | Resolved value |
|---|---|
{packageKey} | This release’s stable package key |
{version} | This release’s version label |
{installPath} | The archive extraction directory inside the generated environment image |
Variables can be combined with literal text, for example
CATALINA_HOME={installPath}/apache-tomcat-{version}. The row’s insertion menu
inserts at the cursor instead of replacing the complete value. The stored
normalized plan contains the resolved value, not a browser placeholder.
{installPath} is available only for archive packages and never refers to a
path on the Code as Usual host.
For archive packages, Code as Usual automatically chooses the isolated default
/opt/code-as-usual/packages/PACKAGE-KEY/VERSION. The location is shown near
the end of the Validation step. It remains read-only unless the administrator
explicitly enables the advanced override. Enabling that override displays a
warning because fixed paths can collide with other packages or make an
environment build unstable. A normal guided template must rely on the generated
location; only software that explicitly requires a fixed absolute path should
supply an override.
A package that needs Java should therefore declare a Java capability under
Depends on. A Java package declares that capability and exports the
JAVA_HOME appropriate for its own installation. The dependent package does
not guess or repeat Java’s internal path. The project screen shows missing
requirements and compatible enabled providers before saving, and the server
checks the complete selection again.
Start blank or import a guided template
A guided template is a versioned JSON file. It contains reusable knowledge about one product and declares the values an installation administrator must supply. Every requested value has a label, detailed help, an example and an optional safe default. A template may ask for such things as a product version, direct archive URL, published checksum and dependency capability. The platform normally supplies the installation directory.
Loading a template is local to the browser. It neither uploads the template nor saves or builds a package. The guide has two explicit starting paths.
- Select Load from our repository, Load local file or Create package without a template.
- The repository path reads the
package template library. Choose a compatible,
versioned template. For local import, drop the
.cau-package.jsonfile onto the upload area or select it with Choose JSON file. Then select Continue. - Read the template description and the help below every requested value. Enter the missing release-specific values and select Continue. There is no separate Apply action.
- The guide now shows the completed generic package definition. Review its Source fields and continue through Runtime and Validation. The blank path opens this same Source step immediately, with empty fields.
- Near the end of Validation, check the generated installation location. Do not enable its advanced override unless the software requires a fixed path.
- On Review, check the normalized source, checksum, extraction path, executable links and validation argument list.
- Select Save draft.
- On the new release card, select Validate and publish.
Every package card has a collapsed Definition and audit details section. Use Export reusable JSON there only when you need to inspect a definition, retain it for audit or reuse it as a starting point. It is deliberately not a primary action on an already published package.
Template file contract
Download the version 1 JSON Schema. Download the version 2 JSON Schema. Download the version 3 JSON Schema.
The top level identifies the format and version, describes the template and
contains parameters plus a definition. A parameter key can be referenced as
${key} in any string inside the definition. The browser replaces only
declared parameters; duplicate parameter keys, unknown placeholders, missing
help text, unsupported input types and wrong field types reject the entire file.
Use a parameter whenever a value varies by release or installation policy.
Typical examples are a version, direct download URL and checksum. Keep
invariant product knowledge—such as a published command path and a minimum
dependency rule—in definition, so the administrator is not asked to make a
product-design decision on every import.
Format 2 can also carry usageGuide, written in Markdown. It contains the
product-specific operating workflow that remains true across installations.
The server resolves the same {packageKey}, {version} and {installPath}
package variables used by environment values, then installs the guide in the
resulting environment image. Do not put credentials or project-specific data
in a package guide.
The resolved definition is still constrained and normalized by the server, so
a template cannot add shell commands or bypass package validation.
Example: Apache Tomcat
Download the Apache Tomcat guided template.
Before opening it, obtain the exact Tomcat archive URL and its SHA-512 checksum from the official Apache distribution. Code as Usual does not guess the current version and does not accept a download without a pinned checksum. The template explains each release- and installation-specific value and supplies only the parts common to Tomcat archives.
The installation directory requested by the template is a path inside the
resulting project environment image, not on the Code as Usual host. The Tomcat
package does not set JAVA_HOME: it declares a dependency on the generic
java capability. The selected Java package owns and exports its own
JAVA_HOME value, so the installation administrator does not need to know its
internal path.
Expected result: the card first shows Validating and refreshes automatically. It becomes Available only after the artifact passes isolated validation. If it becomes Failed, its bounded error remains on the card; correct the definition in a new release or retry when the external cause has been corrected.
Successful validation publishes immediately. There is no second hidden publish step for server-library packages.
Grant it to a workspace
On an Available release, choose the workspace and select Grant to workspace. This does not yet make the package selectable in projects.
The workspace administrator then opens Administration → Environment catalog,
finds the granted server package and selects Enable for projects. A project
manager can now select the release under Project settings → Environment.
When the project runtime is built, the server carries the published package’s already normalized installation plan into the final image. It verifies the published artifact digest first, then applies the bounded archive or Ubuntu package instructions and exports the declared environment variables. The project builder does not contain a table of installation-owned product names or versions.
The same build also installs an immutable package index at
/usr/local/share/code-as-usual, individual guides below its packages
directory and the cau-env command. cau-env describe, cau-env packages and
cau-env guide <package-key> give people and AI agents one generic discovery
path. Packages without an authored guide still receive generated facts about
their paths, commands and exported environment variables.
Revoking a grant or disabling a package removes it from future project revisions. It does not rewrite historical profiles or running environments.
Archive a package
Use Archive package when a draft, failed release or published release should leave the active library. Confirming moves it under Archived packages and prevents it from being granted or enabled for new project revisions.
Archive does not physically delete the definition, validation evidence, published artifact, grants or historical receipts. That retained evidence is needed so existing project revisions remain explainable and reproducible. An archived package that was already enabled can still be disabled, and retained grants can be revoked. Existing environments are not rebuilt or changed.
Use Restore package to return an archived release to exactly the state it had before archiving: Draft, Failed or Available. A restored Draft or Failed release can be corrected. Correct package definition offers the repository template library, local template import and editing of the current values. An imported template must resolve to the same package key and version; published identity remains immutable.
What the safety checks cover
- The form has no shell or Containerfile input.
- Archive downloads require an absolute HTTPS URL and a pinned SHA-256 or SHA-512 value.
- Ubuntu package mode accepts bounded package names.
- Paths, executable links and environment entries are restricted before a build starts.
- Artifact validation runs without network access, on a read-only filesystem, with capabilities dropped and process/memory limits.
The build itself needs access to the reviewed archive URL or Ubuntu package repository. The no-network statement applies to validation, not to downloading the declared package.
Use Tomcat in a project
The package supplies Tomcat; it does not build or deploy the project’s web application. The project still needs a compatible JDK, its Wicket/Felix build, WAR deployment/start commands and an application listener port. After the new project environment revision is built and activated, create a normal preview for that port. See Web preview.
Package template library
This page is the stable index of packaging templates published by Code as Usual. Installation administrators can browse the same catalog directly from Server package library → Create package → Load from our repository.
Download the machine-readable template catalog. Download the catalog format 2 JSON Schema.
Compatibility and versions
Two versions have different purposes:
- Template version identifies a revision of the product knowledge and help text. Updating a template does not change Code as Usual itself.
- Template format version identifies the JSON contract understood by the application. An application accepts only format versions it implements. A catalog entry with a newer format is shown as unsupported and cannot be selected. Local file import applies the same check.
The current application supports template format versions 1, 2 and 3. Format 2 adds a package-authored usage guide. Format 3 adds a generic checksum-pinned single-file installation method, used when an upstream vendor publishes an executable instead of an archive or Ubuntu package. When the contract gains incompatible fields or behavior, both the schema and the format version must change. A new template revision that still uses the same contract does not require an application release.
This catalog contains reusable guides for the installation administrator’s Server package library. It is separate from the maintained version catalog used by ordinary environment packages.
Published templates
Apache Tomcat archive
- Template version: 2.0.0
- Template format: 2
- Supplies:
java.servlet-container - Requires:
java >=17
Download the Apache Tomcat template.
The administrator supplies the Tomcat release, direct archive URL and the
vendor-published SHA-512 checksum. The template owns Tomcat’s archive layout,
published command path, environment contract, Java capability requirement and
the safe writable-CATALINA_BASE workflow used by people and AI agents.
In the resulting environment, CATALINA_HOME is the immutable package
installation. Create a separate writable base below the project directory
before deploying a WAR:
export CATALINA_BASE="$PWD/.runtime/tomcat"
mkdir -p "$CATALINA_BASE"
if [ ! -f "$CATALINA_BASE/conf/server.xml" ]; then
cp -a "$CATALINA_HOME/conf" "$CATALINA_BASE/conf"
fi
mkdir -p "$CATALINA_BASE"/{bin,lib,logs,temp,webapps,work}
Copy the application WAR to $CATALINA_BASE/webapps. catalina run runs in
the foreground for direct diagnostics; catalina start and catalina stop
manage a background process. Tomcat listens on port 8080 by default, so create
an environment preview for port 8080 unless the project changes server.xml.
The installed guide remains authoritative for the exact selected package:
cau-env guide apache.tomcat
Publishing another template
Add the versioned JSON template to the documentation repository and add one
entry to downloads/templates/catalog.json. Keep the catalog address and
format stable. Validate the file with the current template schema before
publishing it:
Download the template format 3 JSON Schema.
Do not replace a version entry with new content. Add a new exact version, keep
older supported entries, update recommended, and publish the template SHA-256.
The release-matched documentation remains the offline fallback.
Update an installation
Updates install a new immutable release beside the current one. Configuration and persistent data remain in place. The previous release is retained for rollback.
Normal update
-
Transfer the new archive and checksum to the server.
-
Verify the checksum.
-
Extract it and run the new release’s updater as the dedicated application account:
cd /var/tmp/code-as-usual-VERSION ./code-as-usual update -
Enter the schema-owner password when requested.
-
Review the migrations, backup location and stopped-environment requirement.
-
Confirm the update.
The updater creates a maintenance backup before migrations, imports bundled
images, activates the new release, restarts the user service and verifies local
readiness. A failure during activation restores the previous release pointer.
The matching documentation is part of the same immutable release, so /docs/
switches together with the application and switches back during rollback.
After update
Log in, confirm the displayed version and test one environment, terminal, preview and the delivery methods used by your workspace. Keep the maintenance backup until acceptance is complete.
Database compatibility determines whether a binary-only rollback is safe. If a migration is marked as requiring restore, use the matching maintenance backup.
Do not bypass a REQUIRES_RESTORE refusal by editing a release archive or its
migration manifest. Use a newer immutable release that contains the reviewed
compatibility migration. RC 35 contains RC 33’s compatibility migration,
supersedes RC 32 and is the supported normal update from RC 31 through RC 34.
Backup and restore
A usable backup contains more than PostgreSQL.
Recovery boundary
Back up together:
- the Code as Usual PostgreSQL database;
- the complete persistent data root;
- application configuration and encryption keys;
- SSH host key and paired-device state;
- private environment homes;
- runtime artifacts that cannot be reconstructed from an immutable release.
Treat the backup directory as a credential-bearing secret. Encrypt it at rest, restrict access and protect copies outside the application host.
Maintenance backup
Stop or quiesce application writes, then use the release’s packaged backup tool. Record the application version, database schema and archive checksum with the backup.
Restore test
A backup is not accepted until it has been restored to an empty, isolated host. Verify login, workspace and project access, an environment’s files and private home, terminal start, Git metadata, preview, SSH identity and one runtime package. Perform this test on a schedule and after major storage changes.
Production storage
The persistent data root contains environment workspaces, personal homes, runtime metadata, transfer receipts and other state that must survive an application update.
Recommended layout
Mount a dedicated filesystem at the configured data root, commonly:
/srv/code-as-usual
Give only the dedicated application account access. Verify the intended mount
with findmnt -T /srv/code-as-usual before starting the service.
A dedicated filesystem prevents a runaway environment from consuming space required by the operating system, PostgreSQL or unrelated services. Code as Usual monitors and attributes usage, but the first release does not promise a hard filesystem quota for every environment workspace.
Failure boundary
Configure startup to fail closed when the expected production mount is absent. Do not let the application silently write into an empty mount-point directory on the operating-system filesystem.
No retention process may delete unpublished work automatically. Storage cleanup remains a visible administrator and owner action.
Troubleshooting
Use this page after following the task page for the action that failed. Keep the visible correlation ID: it connects the browser error to server logs without requiring a terminal transcript or secret.
Start with the smallest boundary that can prove where the failure occurs.
Application does not open
-
Check the dedicated user service through the installation’s administration command or the correct user systemd manager.
-
Test Jetty directly on host loopback:
curl --fail --show-error http://127.0.0.1:8070/login -
If loopback succeeds, inspect reverse-proxy virtual-host selection, Host forwarding, WebSocket upgrade and TLS.
-
Review the application journal without copying secrets into a support case.
Environment cannot reach a dependency
Confirm that the project profile includes the required published network destination and that the environment has accepted the current profile. A tool being installed does not automatically grant internet access.
Terminal or IDE disconnected
Check whether the environment is running, whether project access changed and whether the application restarted. An open browser-terminal window normally reconnects its view automatically and keeps the same server-side terminal and foreground process. Returning to the tab or restoring network access triggers an immediate retry; Reconnect terminal remains available for a manual retry. Do not create another environment merely to recover a browser connection. If automatic retries keep failing, inspect reverse-proxy WebSocket forwarding and the application journal, then confirm that the user’s login and project access are still valid.
Commands fail with Cannot fork
Open Environment → Settings → Storage & runtime and inspect Processes and
threads. Linux counts application processes and their threads as tasks, so
several JVMs and AI agents can exhaust this limit even when the host still has
free memory. Stop servers or agents that are no longer needed. If they must run
together, stop the environment, raise its task limit within the workspace
maximum, save, and start it again.
Do not diagnose this from the host-wide free output: memory availability and
the environment’s task controller are different limits. If the UI says the
task measurement is unavailable, keep the correlation ID and inspect Podman
and the application journal instead of assuming the count is zero.
Environment remains Stopping or cannot be updated
Use Retry stopping when it is offered. A Stopping state means cleanup was requested but the exact runtime has not yet been confirmed as removed. Do not edit the database or mark it Stopped by hand. An environment update correctly refuses to continue while this state is uncertain, because doing so could run two generations against the same persistent files.
If retry fails, keep the visible correlation ID and inspect the application journal and the matching managed Podman objects. Unknown containers must not be deleted merely because their name looks related.
Environment was running before a server restart
This is not an automatic-start condition. After startup reconciliation, the environment should normally be Stopped and can be recreated with Start. Its persistent workspace and configured persistent home are retained, while processes, terminal sessions and temporary files are not.
If it is Missing, use Retry stopping. That state means Code as Usual
could not yet confirm cleanup of the complete old provider stack. Check the
application journal for RUNTIME_RESTART_CLEANUP_FAILED and the environment ID
before inspecting managed Podman objects. Do not start containers manually or
change the database state, because the application must remove the main
container, relays, egress gateway and private network as one registered stack.
Report a problem
Include application version, timestamp, affected object names or opaque IDs, browser and the visible correlation ID. Never include passwords, API tokens, private keys, complete configuration files or terminal transcripts unless they have been deliberately reviewed and redacted.
Security model
Code as Usual is designed for a self-hosted organization with known users. It uses defense in depth but does not describe an arbitrary development container as a perfect hostile-code sandbox.
Main boundaries
- Every environment runs in a rootless Podman container with resource and process limits.
- Persistent storage is separated by installation, workspace, project, environment and owner identity.
- Users are application identities, not host Linux accounts.
- Environment egress is denied except for destinations recorded in the active project profile.
- Host paths, Podman sockets and host shells are not exposed to environments.
- Browser terminal and long-lived transports use authenticated Qwicket contracts with origin, release, authorization and bounded-queue checks.
- Current authorization is rechecked during long-lived connections; revocation closes existing terminal, preview, SSH/SFTP and IDE access.
Credentials
Secrets are encrypted at rest and never written into command lines, terminal history or audit events. Personal program logins live in the environment’s private home. Code as Usual does not read or transfer those files.
Any program running inside an environment has the environment user’s effective filesystem and available network authority. Administrators should grant the least repository and service access that the project requires.
Deliberate limits
The product does not record terminal commands by default. It does not provide host Docker/Podman sockets, silent package installation, unrestricted outbound internet, automatic deletion of unpublished work or invisible cross-user file sharing.
Installation administrators can extend the package catalog only through registered, bounded builders. The UI accepts neither shell text nor a Containerfile. Archive input requires HTTPS and a pinned digest; the resulting artifact is validated without network access and with a read-only filesystem, dropped capabilities and resource limits before it can be granted. A workspace administrator must still enable the grant before a project can select it.
Authentication
The first release supports local password authentication combined with a second factor.
Authenticator application
Register TOTP by scanning the QR code shown during setup with a trusted authenticator application. Store recovery information according to your organization’s policy. TOTP works without an email service.
Email code
Email codes require installation or workspace SMTP configuration and a verified user address. Delivery must use TLS and the provider’s supported authentication method.
Operational guidance
- Require long, unique passwords and a second factor for every administrator.
- Protect the SMTP account and encryption keys as production secrets.
- Remove or suspend users promptly and verify that active connections close.
- Use HTTPS exclusively; do not expose Jetty’s loopback port publicly.
OIDC is not part of the 0.1 supported scope. Organizations requiring centralized identity lifecycle and conditional access should treat that as a deployment requirement for a later supported release.
Product model
Understanding four objects prevents most configuration mistakes.
Installation
└── Workspace
└── Project
└── Environment
├── Terminal A
├── Terminal B
├── Files and repository checkouts
├── Web previews
└── SSH and IDE connections
Workspace
A workspace is the organizational and administrative boundary. It contains members, projects, approved packages, services, policies and audit metadata. Membership does not automatically grant access to every project.
Project
A project is a shared definition for one product or codebase. It describes members, repositories, tools, services, network access and resource defaults. It is not a shared writable checkout.
Environment
An environment is one developer’s durable remote working computer for a project. It owns persistent files, repository checkouts, one runtime generation and any number of terminals. A developer may create separate environments for different branches or tasks.
Two environments never share a writable checkout. Git is the normal boundary for collaboration between them.
Terminal
A terminal is one shell or PTY inside an environment. All terminals in the same environment see the same files, installed tools and loopback services. Closing a terminal does not remove the environment or its files.
The technical path /workspace is the environment’s persistent working path.
It is unrelated to the organizational term Workspace.
Paths and lifetimes
| Path or object | Purpose | Lifetime |
|---|---|---|
/workspace/repositories/<name> | Personal checkout of a project repository | Until explicit environment deletion or handover |
/workspace/files | Durable non-repository environment files | Until explicit environment deletion or handover |
/workspace-scratch | Temporary working data | According to visible retention policy |
/home/ubuntu | Private tool logins and user configuration | Environment owner only; never handed over |
/usr/local/share/code-as-usual/README.md | Overview of selected packages for people and AI agents | Immutable project runtime image |
/usr/local/share/code-as-usual/packages/<package-key>/README.md | Authored instructions plus generated package facts | Immutable project runtime image |
/usr/local/share/code-as-usual/environment.json | Machine-readable package paths, commands and environment | Immutable project runtime image |
/run/code-as-usual-services/<service-id>/README.md | Variable names and usage instructions for one connected external service; no secret values | Recreated for each running environment runtime |
/run/code-as-usual-services/<service-id>/ private binding files | Generated credentials and client configuration for the authorized service | Private, read-only mount removed when the runtime stops |
| Terminal | One PTY and bounded display history | Until terminal close or environment stop |
| Environment | Runtime plus persistent files and receipts | Survives terminal and application restart |
| Project | Shared team configuration | Workspace-managed |
The container username is an implementation detail. Use the paths shown by the environment receipt rather than assuming access to host filesystem paths.
Release 0.1 supported scope
The 0.1 pilot supports a self-hosted Ubuntu x86-64 installation for trusted internal users and non-critical data while operational acceptance is completed.
Core supported capabilities include:
- workspaces, projects, access roles and user-owned environments;
- persistent files and several terminals per environment;
- curated runtime packages and bounded outbound destinations;
- installation-owned bounded server packages with reviewed dependencies and workspace grant/enable control;
- generic Git repository definitions and personal credentials;
- authenticated private web preview;
- browser files, preview/editor support and ZIP transfer;
- desktop connector, SSH/SFTP transport and VS Code launch;
- Web Push and SMTP notification delivery;
- optional Codex and Claude Code terminal hook adapters;
- read-only terminal sharing and environment handover;
- immutable releases, migrations, backup, update and rollback tooling.
Not all future roadmap items are part of this scope. In particular, 0.1 does not promise OIDC/SCIM, a cloud multi-customer service, arbitrary customer plugin execution, host container sockets, a complete visual Git client or hard per-environment filesystem quotas.