
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@frihet/sdk
Advanced tools
Official TypeScript SDK for the Frihet API. AI-native business management.
npm install @frihet/sdk
import Frihet from '@frihet/sdk';
const frihet = new Frihet({ apiKey: 'fri_...' });
// Create an invoice
const invoice = await frihet.invoices.create({
clientName: 'Acme Corp',
items: [{ description: 'Consulting', quantity: 10, unitPrice: 150 }],
});
// List overdue invoices
const overdue = await frihet.invoices.list({ status: 'overdue' });
// Mark as paid
await frihet.invoices.markPaid(invoice.id);
// Send by email
await frihet.invoices.send(invoice.id, { recipientEmail: 'billing@acme.com' });
// Download PDF
const pdf = await frihet.invoices.pdf(invoice.id);
| Resource | Methods |
|---|---|
frihet.invoices | list, retrieve, create, update, del, search, markPaid, send, pdf, createBatch |
frihet.expenses | list, retrieve, create, update, del, search, createBatch |
frihet.clients | list, retrieve, create, update, del, search |
frihet.vendors | list, retrieve, create, update, del, search |
frihet.products | list, retrieve, create, update, del, search |
frihet.quotes | list, retrieve, create, update, del, search, send, pdf |
frihet.webhooks | list, retrieve, create, update, del |
frihet.intelligence | context, summary, monthly, quarterly |
// Full business context (one call for AI agents)
const ctx = await frihet.intelligence.context();
// Monthly P&L with tax liability
const march = await frihet.intelligence.monthly('2026-03');
// Quarterly tax prep (Modelo 303/130)
const q1 = await frihet.intelligence.quarterly('2026-Q1');
// Financial summary with date range
const ytd = await frihet.intelligence.summary({ from: '2026-01-01', to: '2026-12-31' });
import Frihet, { RateLimitError, NotFoundError, ValidationError } from '@frihet/sdk';
try {
await frihet.invoices.retrieve('nonexistent');
} catch (err) {
if (err instanceof NotFoundError) {
console.log('Invoice not found');
} else if (err instanceof RateLimitError) {
console.log(`Retry after ${err.retryAfter}s`);
} else if (err instanceof ValidationError) {
console.log('Validation:', err.details);
}
}
import { Webhooks } from '@frihet/sdk';
const isValid = Webhooks.verifySignature(
rawBody,
req.headers['x-frihet-signature'],
webhookSecret,
);
const frihet = new Frihet({
apiKey: 'fri_...',
baseUrl: 'https://api.frihet.io/v1', // default
timeout: 30000, // 30s default
});
// Per-request options
await frihet.invoices.create(data, {
idempotencyKey: 'unique-key-123',
timeout: 60000,
});
MIT
FAQs
Official Frihet SDK — AI-native business management API client
The npm package @frihet/sdk receives a total of 3 weekly downloads. As such, @frihet/sdk popularity was classified as not popular.
We found that @frihet/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.