Infra for AI Code Assistants
Work with codebases.
Authenticate GitHub users.
Clone repos, make commits, create PRs.
Run tasks with custom code.
Use Node.js library
import Reptoid from '@reptoid/codebases'
const reptoid = new Reptoid({ accessToken: '<YOUR_TOKEN>' })
Sync your users with Reptoid accounts
Each account will have access to one of your users' GitHub account.
Accounts can operate with codebases and synchronize them with GitHub.
Create manually
const { accountId } = await.reptoid.accounts().create()
await reptoid
Auth with GitHub inside callback
const {
} = await reptoid.github().authByCode(code)
Manage workspaces
Workspace is a folder with files and connected GitHub repo.
Create empty workspace
const { workspaceId } = await reptoid
Clone from GitHub
const { workspaceId } = await reptoid
Manage files
Mount a remote disk directly on your instance and work with workspaces as if it were local files.
echo $YOUR_KERBEROS_TOKEN | kinit $

mount \
    -t nfs4 \
    -o sec=krb5p,timeo=600 \$WORKSPACE_ID \

echo 'Hello, world!' > ~/workspace/test.txt
// write
await reptoid
    .write('Hello, world!')

// read
const content = await reptoid
Perform Git/GitHub commands without thinking about auth.
// create new repo & set origin
await reptoid
await reptoid

// commit & push
await reptoid.account(accountId).workspace(workspaceId).addAll()
await reptoid.account(accountId).workspace(workspaceId).commit({ message: 'Test commit' })
await reptoid.account(accountId).workspace(workspaceId).push()