Version 1.4.0 (current)
Your first Taku API call
List methods on your computer before connecting a device or writing a tool.
List the methods Taku can call from your computer. No phone is needed.
Requires the system source
This tutorial runs from the taku-os repository root. Step 1 clones taku-os.
Before you begin
Install Git and Node.js 20+.
Run these commands in a computer terminal, inside the system repository. This command-line program is called the CLI. JavaScript tools later use its companion client library, the SDK.
1. Open the system repository
For your first checkout:
git clone https://github.com/Taku-OS/taku-os.git
cd taku-osWith an existing checkout, enter that taku-os directory instead.
2. List methods
node sdk/cli/taku.mjs call methods.listThe JSON result should have ok: true and a method list in result. Look for system.info, displays.status and tasks.status: system information, displays and task status.
This excerpt keeps the fields to check; actual entries also describe permissions and other properties:
{
"ok": true,
"result": [
{"id": "system.info"},
{"id": "displays.status"},
{"id": "tasks.status"},
{"id": "methods.list"},
{"id": "capabilities.list"},
{"id": "extensions.list"}
]
}This reads the local method directory without contacting a phone. Seeing this result completes your first call.
3. Call it from your own script
Create first-call.mjs in the repository root:
import { TakuClient } from './sdk/client.mjs';
const client = new TakuClient();
const methods = await client.call('methods.list');
console.log(methods.map(method => method.id).join('\n'));Run it:
node first-call.mjsThe terminal prints the same six method names, one per line. This time you used the SDK instead of the CLI's JSON envelope: client.call() returns the method data directly. It uses existing repository files and needs no model account.
Change the output to print only methods[0].id and run it again. You should see just system.info. The next tutorial keeps this calling pattern and connects a real device.
Next steps
With a prepared development device, build a device-summary tool that combines Android version and display information.
For an Android app, try app interfaces. Use the CLI reference when you need command parameters rather than reading the complete protocol first.
Troubleshooting
- Clone fails: Taku-OS/taku-os is public and requires no repository access grant. Verify the repository URL (
https://github.com/Taku-OS/taku-os.git), check your network or proxy settings, and inspect any cached Git credentials (an expired personal access token can cause HTTPS requests to fail even on public repositories). - Node.js missing: install a supported version and reopen the terminal.
sdk/cli/taku.mjsmissing: check that you are in the system repository root.
Research preview · Current availability
Report an issue or give feedback
Delivery to the maintenance queue does not mean it has been handled. Feedback is retained for 90 days.
Built with Fumadocs