Skip to main content
Running tscircuit

Using ti-parts-engine

@tscircuit/ti-parts-engine helps you provide TI-backed behavior through a custom platform configuration in local development workflows.

This guide assumes @tscircuit/ti-parts-engine is available in your local development environment.

Use TI as a Custom Parts Engine

If your local tooling loads a JS/TS platform config module, you can keep the TI parts engine in a tscircuit.config.ts-style file:

import { createTiPartsEngine } from "@tscircuit/ti-parts-engine"

export default {
platformConfig: {
partsEngine: createTiPartsEngine({
// local CLI/dev usage only
partnerToken: process.env.PARTNER_TOKEN!,
}),
},
}

This wires TI-backed automatic part lookup through platform.partsEngine.

info

Keep PARTNER_TOKEN in local development tooling only. Do not expose it to browser clients or commit it to your repository.

Use Explicit ti: Footprint Strings

If you want to use explicit footprint strings such as footprint="ti:MSP430", you also need a TI footprint library mapping. The easiest way to wire both pieces together is createTiPlatformConfig(...):

import { createTiPlatformConfig } from "@tscircuit/ti-parts-engine"

export default {
platformConfig: createTiPlatformConfig({
partnerToken: process.env.PARTNER_TOKEN!,
}),
}

This configures:

  • partsEngine for TI-backed part lookup
  • footprintLibraryMap.ti for explicit ti: footprint strings

If you only provide createTiPartsEngine(...), automatic TI part lookup works, but the ti: footprint prefix is not added by itself.

Example User Project Files

If your local tooling supports a JS/TS platform config module, a minimal TI footprint project can look like this:

index.circuit.tsx

export default () => (
<board width="20mm" height="20mm">
<chip name="U1" footprint="ti:MSP430" />
</board>
)

tscircuit.config.ts

import { createTiPlatformConfig } from "@tscircuit/ti-parts-engine"

export default {
platformConfig: createTiPlatformConfig({
// local CLI/dev usage only
partnerToken: process.env.PARTNER_TOKEN!,
}),
}

This is a local CLI/dev style workflow. Do not expose a real PARTNER_TOKEN to browser clients.

Programmatic Usage

You can also pass the same createTiPlatformConfig(...) result directly when creating a runner or root circuit:

import { RootCircuit } from "@tscircuit/core"

const circuit = new RootCircuit({
platform: createTiPlatformConfig({
partnerToken: process.env.PARTNER_TOKEN!,
}),
})

For more background on platform customization, see Platform Configuration.