
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@fleettools/shared
Advanced tools
Shared utilities and configuration for FleetTools
npm install @fleettools/fleet-shared
# or
bun install @fleettools/fleet-shared
import { detectRuntime, getRuntimeInfo } from '@fleettools/fleet-shared/runtime';
const runtime = detectRuntime(); // 'bun' | 'node' | 'unknown'
const info = getRuntimeInfo();
// {
// type: 'bun',
// version: '1.0.0',
// platform: 'linux',
// arch: 'x64',
// supported: true,
// isBun: true,
// isNode: false
// }
import {
loadGlobalConfig,
saveGlobalConfig,
loadProjectConfig,
isFleetProject
} from '@fleettools/fleet-shared/config';
const globalConfig = loadGlobalConfig();
const projectConfig = loadProjectConfig();
const isProject = isFleetProject();
import {
initializeProject,
getAvailableTemplates
} from '@fleettools/fleet-shared/project';
const templates = getAvailableTemplates(); // ['basic', 'agent']
const config = initializeProject('./my-project', 'basic', {
name: 'My Project',
services: { squawk: { enabled: true } }
});
import {
commandExists,
sleep,
retry,
formatBytes,
formatDuration,
generateId
} from '@fleettools/fleet-shared/utils';
const hasNode = commandExists('node');
await sleep(1000);
const result = await retry(() => riskyOperation(), 3);
detectRuntime(): RuntimeType - Detect current JavaScript runtimegetRuntimeInfo(): RuntimeInfo - Get detailed runtime informationisSupportedRuntime(): boolean - Check if runtime is supportedgetPreferredRuntime(): 'bun' | 'node' - Get preferred runtimeloadGlobalConfig(): FleetGlobalConfig - Load global configurationsaveGlobalConfig(config: FleetGlobalConfig): void - Save global configurationloadProjectConfig(): FleetProjectConfig | null - Load project configurationsaveProjectConfig(config: FleetProjectConfig): void - Save project configurationisFleetProject(): boolean - Check if directory is a FleetTools projectinitializeProject(path, template, config): FleetProjectConfig - Initialize new projectgetAvailableTemplates(): string[] - Get available project templatesgetTemplateInfo(name): ProjectTemplate | null - Get template informationisValidProject(path): boolean - Validate project structuregetProjectRoot(): string | null - Find project root directorycommandExists(command): boolean - Check if command exists in PATHsleep(ms): Promise<void> - Sleep for specified millisecondsretry(fn, maxAttempts, baseDelay): Promise<T> - Retry with exponential backoffformatBytes(bytes): string - Format bytes to human readable stringformatDuration(ms): string - Format duration to human readable stringgenerateId(length): string - Generate random IDdeepClone(obj): T - Deep clone objectisPromise(value): boolean - Check if value is a promiseEventEmitter - Simple event emitter classinterface RuntimeInfo {
type: RuntimeType;
version: string;
platform: string;
arch: string;
supported: boolean;
isBun: boolean;
isNode: boolean;
}
interface FleetGlobalConfig {
version: string;
defaultRuntime: 'bun' | 'node';
telemetry: {
enabled: boolean;
endpoint?: string;
};
services: {
autoStart: boolean;
squawkPort: number;
apiPort: number;
};
paths: {
configDir: string;
dataDir: string;
logDir: string;
};
}
interface FleetProjectConfig {
name: string;
version: string;
fleet: {
version: string;
mode: 'local' | 'synced';
workspaceId?: string;
};
services: {
squawk: {
enabled: boolean;
port: number;
dataDir: string;
};
api: {
enabled: boolean;
port: number;
};
postgres: {
enabled: boolean;
provider: 'podman' | 'docker' | 'local';
port: number;
container?: string;
dataDir: string;
};
};
plugins: {
claudeCode: boolean;
openCode: boolean;
};
}
git clone https://github.com/v1truvius/fleettools.git
cd fleettools/packages/fleet-shared
bun install
bun run dev # Development mode with watch
bun test
bun run test:coverage
MIT License - see LICENSE file for details.
FAQs
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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.