Getting started
Install GitTrix, create your first session, and run your first promotion.
Install
Section titled “Install”bun installStart first session
Section titled “Start first session”import { GitTrix } from '@gittrix/core'import { LocalDurableAdapter, LocalEphemeralAdapter } from '@gittrix/adapter-local'
const gittrix = new GitTrix({ durable: new LocalDurableAdapter({ path: '/path/to/repo' }), ephemeral: new LocalEphemeralAdapter({ baseDir: '/tmp/gittrix' }),})
const session = await gittrix.startSession({ task: 'first task', durableBranch: 'main' })Do first agent commit
Section titled “Do first agent commit”const agent = session.forAgent()await agent.write('README.md', new TextEncoder().encode('hello from session\n'))await agent.commit('docs: test session write')Do first promote
Section titled “Do first promote”const result = await session.promote({ selector: { all: true }, strategy: 'auto', message: 'Apply first session changes',})Promotion is human-controlled and is the only route to durable history.