You will:
- Install the SDK and CLI
- Bootstrap the first account and API key
- Verify the install
- Sync one product and one order
- Plan and execute the first export
#1. Install the SDK
bash
pnpm add @entrygo/sdk#2. Initialize the local app
bash
npx entrygo init#3. Bootstrap the first account and API key
bash
npx entrygo bootstrap --name "Acme Supply" --email ops@acme.comThis is the official first-run path on a fresh EntryGo instance.
#4. Initialize the client
ts
import { EntryGo } from "@entrygo/sdk";
const entrygo = new EntryGo({
apiKey: process.env.ENTRYGO_API_KEY
});#5. Verify the install
bash
npx entrygo verifyOr from the SDK:
ts
const verification = await entrygo.setup.verify();#6. Sync one product
ts
const product = await entrygo.products.upsert({
externalId: "prod-ext-1",
sku: "JKT-001",
name: "Wool jacket",
originCountry: "CA",
declaredValueUsd: 110,
materials: ["wool"]
});#7. Sync one order
ts
const order = await entrygo.orders.create({
externalId: "ord-ext-1",
destinationCountry: "US",
destinationRegion: "CA",
destinationPostalCode: "94105",
items: [
{
productId: product.id,
quantity: 1,
unitValueUsd: 110
}
]
});#8. Plan the first export
ts
const plan = await entrygo.exports.plan(order.id);#9. Execute the export
ts
const result = await entrygo.exports.execute(plan.batch_id);#10. Inspect the final state
ts
const inspection = await entrygo.exports.inspect(plan.exportId);#Setup status
Agents and applications can read setup progress with:
bash
curl http://localhost:3000/setup/statusAuthenticated example:
bash
curl http://localhost:3000/setup/status \
-H "authorization: Bearer $ENTRYGO_API_KEY"Example response:
json
{
"configured": false,
"accountId": "acc_123",
"missing": ["products", "orders", "export_plan"],
"next_step": "sync_products",
"defaults": {
"warehouseId": null,
"brokerId": null
}
}#Capability discovery
AI agents can discover EntryGo automatically with:
bash
curl http://localhost:3000/.well-known/entrygoExample fields:
json
{
"install": {
"package": "@entrygo/sdk",
"cli": "entrygo",
"command": "pnpm add @entrygo/sdk"
},
"verification": {
"cli": "npx entrygo verify",
"sdk": "entrygo.setup.verify()",
"setup_status": "GET /setup/status"
},
"bootstrap": {
"cli": "npx entrygo bootstrap --name 'Acme' --email ops@example.com",
"endpoint": "POST /api/bootstrap/first-run",
"token_env": "ENTRYGO_BOOTSTRAP_TOKEN",
"first_run_only": true,
"production_requires_token": true
}
}#Official first-run flow
bash
npx entrygo init
npx entrygo bootstrap --name "Acme Supply" --email ops@acme.com
npx entrygo verify