Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

827 B
Raw Blame
import { cli, Strategy } from '@jackwener/opencli/registry';
cli({
    site: 'hackernews',
    name: 'user',
    access: 'read',
    description: 'Hacker News user profile',
    domain: 'news.ycombinator.com',
    strategy: Strategy.PUBLIC,
    browser: false,
    args: [
        { name: 'username', required: true, positional: true, help: 'HN username' },
    ],
    columns: ['username', 'karma', 'created', 'about'],
    pipeline: [
        { fetch: { url: 'https://hacker-news.firebaseio.com/v0/user/${{ args.username }}.json' } },
        { map: {
                username: '${{ item.id }}',
                karma: '${{ item.karma }}',
                created: `\${{ item.created ? new Date(item.created * 1000).toISOString().slice(0, 10) : '' }}`,
                about: '${{ item.about }}',
            } },
    ],
});