open-index/open-npm huggingface dataset:
npm package: @surgent-dev/surpay-convex
Description: Convex integration for Surpay SDK
Author: Surgent
Latest version: 0.2.1

# @surgent-dev/surpay-convex

Convex integration for Surpay SDK.

## Install

```bash
npm install @surgent-dev/surpay-convex
```

## Setup

Step 1: Create `convex/surpay.ts`

```typescript
import { Surpay } from "@surgent-dev/surpay-convex";

const surpay = new Surpay({
  apiKey: process.env.SURPAY_API_KEY!,
  identify: async (ctx) => {
    const identity = await ctx.auth.getUserIdentity();
    if (!identity) return null;
    return {
      customerId: identity.subject,
      customerData: { name: identity.name, email: identity.email },
    };
  },
});

export const {
  createCheckout,
  check,
  getCustomer,
  listCustomers,
  listSubscriptions,
} = surpay.api();
```

Step 2: Set environment variable

Add `SURPAY_API_KEY` to your Convex dashboard environment variables.

## Usage

### Create Checkout

```typescript
import { api } from "./_generated/api";

// Inside a Convex action or from client
const { data, error } = await ctx.runAction(api.surpay.createCheckout, {
  productId: "prod_123",
  customerId: "cust_123", // Optional if using identify()
  priceId: "price_123",
  successUrl: "https://example.com/success",
  cancelUrl: "https://example.com/cancel",
});

if (error) {
  console.error(error.message);
} else {
  console.log(data.checkoutUrl);
}
```

### Check Access

```typescript
import { api } from "./_generated/api";

const { data, error } = await ctx.runAction(api.surpay.check, {
  productId: "prod_123",
  customerId: "cust_123", // Optional if using identify()
});

if (data?.allowed) {
  // Allow access
}
```

### Get Customer

```typescript
import { api } from "./_generated/api";

const { data, error } = await ctx.runAction(api.surpay.getCustomer, {
  customerId: "cust_123",
});
```

### List Customers

```typescript
import { api } from "./_generated/api";

const { data, error } = await ctx.runAction(api.surpay.listCustomers, {});
```

### List Subscriptions

```typescript
import { api } from "./_generated/api";

const { data, error } = await ctx.runAction(api.surpay.listSubscriptions, {});
```

## API Reference

| Action | Args | Returns |
|--------|------|---------|
| `createCheckout` | `productId`, `customerId?`, `priceId?`, `successUrl?`, `cancelUrl?` | `{ checkoutUrl: string, customerId: string }` |
| `check` | `productId`, `customerId?` | `{ allowed: boolean }` |
| `getCustomer` | `customerId` | `CustomerWithDetails` |
| `listCustomers` | - | `Customer[]` |
| `listSubscriptions` | - | `Subscription[]` |
npm package: @surgio/eslint-config-surgio
Description: ESLint config for Surgio config stores
Author: Roy Li
Latest version: 2.1.0

<p align="center">
    <a href="https://surgio.js.org/" target="_blank">
        <img width="180" src="https://raw.githubusercontent.com/geekdada/surgio/master/docs/.vuepress/public/surgio-icon.png" alt="logo">
    </a>
</p>

<h2 align="center">eslint-config-surgio</h2>

[![NPM version][npm-image]][npm-url]
[![npm download][download-image]][download-url]

[npm-image]: https://img.shields.io/npm/v/@surgio/eslint-config-surgio.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@surgio/eslint-config-surgionyk.io/test/npm/@surgio/eslint-config-surgio
[download-image]: https://img.shields.io/npm/dm/@surgio/eslint-config-surgio.svg?style=flat-square
[download-url]: https://npmjs.org/package/@surgio/eslint-config-surgio

## 文档

查看完整使用文档，前往 [surgio.js.org](https://surgio.js.org)。

## 交流

[<img width="207" src="https://raw.githubusercontent.com/geekdada/surgio/master/docs/.vuepress/public/join-telegram.png">](https://t.me/surgiotg)
npm package: @surgio/gateway
Description: Surgio API Gateway 面板
Author: Roy Li
Latest version: 2.3.1

<p align="center">
    <a href="https://surgio.js.org/" target="_blank">
        <img width="180" src="https://raw.githubusercontent.com/geekdada/surgio/master/docs/.vuepress/public/surgio-icon.png" alt="logo">
    </a>
</p>

<h2 align="center">Gateway</h2>

[![NPM version][npm-image]][npm-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]
[![npm download][download-image]][download-url]

[npm-image]: https://img.shields.io/npm/v/@surgio/gateway.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@surgio/gateway
[snyk-image]: https://snyk.io/test/npm/@surgio/gateway/badge.svg?style=flat-square
[snyk-url]: https://snyk.io/test/npm/@surgio/gateway
[download-image]: https://img.shields.io/npm/dm/@surgio/gateway.svg?style=flat-square
[download-url]: https://npmjs.org/package/@surgio/gateway

## 文档

查看完整使用文档，前往 [surgio.js.org](https://surgio.js.org)。

## 交流

[<img width="207" src="https://raw.githubusercontent.com/geekdada/surgio/master/docs/.vuepress/public/join-telegram.png">](https://t.me/surgiotg)
npm package: @surgio/gateway-frontend
Description: Surgio API Gateway Frontend
Author: Roy Li
Latest version: 2.2.0

<p align="center">
    <a href="https://surgio.js.org/" target="_blank">
        <img width="180" src="https://raw.githubusercontent.com/geekdada/surgio/master/docs/.vuepress/public/surgio-icon.png" alt="logo">
    </a>
</p>

<h2 align="center">Gateway Frontend</h2>

[![NPM version][npm-image]][npm-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]
[![npm download][download-image]][download-url]

[npm-image]: https://img.shields.io/npm/v/@surgio/gateway-frontend.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@surgio/gateway-frontend
[snyk-image]: https://snyk.io/test/npm/@surgio/gateway-frontend/badge.svg?style=flat-square
[snyk-url]: https://snyk.io/test/npm/@surgio/gateway-frontend
[download-image]: https://img.shields.io/npm/dm/@surgio/gateway-frontend.svg?style=flat-square
[download-url]: https://npmjs.org/package/@surgio/gateway-frontend

## 文档

查看完整使用文档，前往 [surgio.js.org](https://surgio.js.org)。

## 交流

[<img width="207" src="https://raw.githubusercontent.com/geekdada/surgio/master/docs/.vuepress/public/join-telegram.png">](https://t.me/surgiotg)
npm package: @surgio/logger
Description: Logger helper for Surgio projects
Author: Roy Li
Latest version: 1.4.2

<p align="center">
    <a href="https://surgio.js.org/" target="_blank">
        <img width="180" src="https://raw.githubusercontent.com/geekdada/surgio/master/docs/.vuepress/public/surgio-icon.png" alt="logo">
    </a>
</p>

<h2 align="center">Logger</h2>

[![NPM version][npm-image]][npm-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]
[![npm download][download-image]][download-url]

[npm-image]: https://img.shields.io/npm/v/@surgio/logger.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@surgio/logger
[snyk-image]: https://snyk.io/test/npm/@surgio/logger/badge.svg?style=flat-square
[snyk-url]: https://snyk.io/test/npm/@surgio/logger
[download-image]: https://img.shields.io/npm/dm/@surgio/logger.svg?style=flat-square
[download-url]: https://npmjs.org/package/@surgio/logger

## 文档

查看完整使用文档，前往 [surgio.js.org](https://surgio.js.org)。

## 交流

[<img width="207" src="https://raw.githubusercontent.com/geekdada/surgio/master/docs/.vuepress/public/join-telegram.png">](https://t.me/surgiotg)
npm package: @surhodev/lib-test1
Description: First test of library publication
Author: surhodev
Latest version: 1.0.2

# @surhodev/lib-test1

> First test of library publication

[![NPM](https://img.shields.io/npm/v/lib-test1.svg)](https://www.npmjs.com/package/@surhodev/lib-test1) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save @surhodev/lib-test1
```

## Usage

```jsx
import React, { Component } from 'react'

import MyComponent from '@surhodev/lib-test1'
import '@surhodev/lib-test1/dist/index.css'

class Example extends Component {
  render() {
    return <MyComponent />
  }
}
```

## License

MIT © [surhodev](https://github.com/surhodev)
npm package: @surihoney/time-ago
Description: Lightweight utility to humanize past timestamps into relative time strings.
Author: Suriyanti Panagen
Latest version: 1.0.2


## @surihoney/time-ago

A zero-dependency TypeScript utility to convert timestamps into human-readable "time ago" strings. It’s a lightweight alternative to heavy date libraries.

### Installation

```
npm install @surihoney/time-ago
```

### Usage

```
import { timeAgo } from '@surihoney/time-ago';

// 1. Basic numeric usage
console.log(timeAgo(Date.now() - 60000));
// Output: "1 minute ago"

// 2. Using "words" style (English words for numbers 1-10)
console.log(timeAgo(Date.now() - 3600000, { numberStyle: 'words' })); 
// Output: "one hour ago"

// 3. Custom "just now" label
console.log(timeAgo(Date.now() - 2000, { justNow: 'Right now' })); 
// Output: "Right now"


```

## ⚙️ Output Reference

The library automatically calculates the best unit for readability based on the difference between the input and "now":


| Time Difference | Output Example (Numeric) | Output Example (Words) |
| :--- | :--- | :--- |
| < 5 seconds | "just now" | "just now" |
| 5 - 59 seconds | "45 seconds ago" | "forty-five seconds ago" |
| 1 - 59 minutes | "15 minutes ago" | "fifteen minutes ago" |
| 1 - 23 hours | "3 hours ago" | "three hours ago" |
| 1 - 6 days | "2 days ago" | "two days ago" |
| 1 - 4 weeks | "1 week ago" | "one week ago" |
| 1 - 11 months | "5 months ago" | "five months ago" |
| > 1 year | "2 years ago" | "two years ago" |


> **Note:** When using `{ numberStyle: "words" }`, the library typically converts numbers 1 through 10 into English words.
npm package: @surimi/parsers
Description: A neat little parser for CSS selectors - written in typescript types
Author: Janis jansen
Latest version: 0.7.0

# @surimi/parsers

Zero-dependency tokenizers / stringifyers for CSS selectors, at-rules etc - written in typescript types.

## Selectors

Convert a valid CSS selector into a list of `nodes`, each representing a token, both at runtime and in typescript types.

```css
html#container > .button
```

becomes something like

```ts
[
  {
    type: "type";
    name: "html";
    content: "html";
  },
  {
    type: "id";
    name: "container";
    content: "#container";
  },
  {
    type: "combinator";
    content: ">";
  },
  {
    type: "class";
    name: "button";
    content: ".button";
  },
]
```

## At-rules

The same thing for `at-rules`: Given something like an `@media screen and (min-width: 600px)`, you will get

```ts
[{
  { type: 'at-rule-name', name: 'media', content: '@media' },
  { type: 'identifier', value: 'screen', content: 'screen' },
  { type: 'operator', operator: 'and', content: 'and' },
  { type: 'delimiter', delimiter: '(', content: '(' },
  { type: 'identifier', value: 'min-width', content: 'min-width' },
  { type: 'delimiter', delimiter: ':', content: ':' },
  { type: 'dimension', value: 768, unit: 'px', content: '768px' },
  { type: 'delimiter', delimiter: ')', content: ')' },
}];
```

---

This is inspired by, and partially includes code derived from, https://parsel.verou.me by the one and only [Lea Verou](https://github.com/sponsors/LeaVerou).
npm package: @surinderlohat/chrome-extension-builder
Description: chrome-extension-builder
Author: Surinder Singh
Latest version: 1.0.1

# Chrome Extension Builder
## A simple cli tool to create your chrome extension 

Chrome Extension Builder is a tool created by Surinder Singh which helps you to create your chrome extensions.
No need to spent time on configuration just run `chrome-extension-builder create-app` and you are ready to work on your next chrome extension. 
## Features
- Create your next chrome extension in seconds.
- Super easy to use CLI.
- New temples are coming in future releases.

## Templates
We provide number of templates to start in seconds..
- [Simple JS] - Start with simple js based extension to get started with chrome extensions!

And of course chrome-extension-builder is open source with a public repository
on GitHub always free to use.

#### Please show some love by giving Start to this repo.

## Installation
We need [Node.js](https://nodejs.org/) v12+ to run.
Install the this npm package as global.

```sh
npm install chrome-extension-builder -g
```

And then run...

```sh
chrome-extension-builder create-app
```
it will ask you few questions i.e name of your project and description

## Development
Want to contribute? Great!
Just implement your changes and create pull request

## About me 
[https://github.com/surinderlohat](https://github.com/surinderlohat)
npm package: @surinderlohat/react-dialog
Description: Show Dialogs with easy way in react JS, super easy to use and can handel all the major user cases. ##### Based on the React hooks and reactive programing. #### No extra dependencies pure react js code & lightweight.
Author: Surinder Singh
Latest version: 0.1.1

# React Dialog

Show Dialogs with easy way in react JS, super easy to use and can handel all the major user cases.
##### Based on the React hooks and reactive programing.
#### No extra dependencies pure react js code & lightweight.

## Features
1. useDialog Hook to show dialogs in functional components.
3. use dialog from any UI library i.e MUI/bootstrap  or any other UI library
2. Open source Free to use.

## Installation
```sh
npm install @surinderlohat/react-dialog
or
yarn add @surinderlohat/react-dialog
```
## How to use
- Add Dialog Provider
App.tsx
```sh
import { FC } from 'react';
import { DialogProvider } from '@surinderlohat/react-dialog';
import BootstrapDialog from './BootstrapDialog';
import MUIDialog from './MUIDialog';

// App.tsx
const App: FC = () => {
  return (
    <DialogProvider>
      <BootstrapDialog />
      <MUIDialog />
    </DialogProvider>
  );
};

export default App;
```
- Import Use Dialog Hook that's it 
  #### MUI Dialog Example :
```sh
import { FC } from 'react';
import { Box, Button, Dialog, DialogTitle } from '@mui/material';
import { useDialog } from '@surinderlohat/react-dialog';

const MuiDialog: FC = () => {
  const dialog = useDialog();

  // Show MUI Dialog
  const showMuiDialog = () => {
    dialog.openDialog(
      <Dialog open={true} onClose={() => dialog.closeDialog()}>
        <DialogTitle>MUI Dialog Example</DialogTitle>
        <p>Welcome to react dialog</p>
      </Dialog>
    );
  };

  return (
    <Box sx={{ display: 'flex', justifyContent: 'center' }}>
      <Button onClick={showMuiDialog}>SHOW MUI DIALOG </Button>
    </Box>
  );
};
export default MuiDialog;
```
 #### Bootstrap Dialog Example :
```sh
import { FC } from 'react';
import { useDialog } from '@surinderlohat/react-dialog';
import { Modal, Button } from 'react-bootstrap';
import 'bootstrap/dist/css/bootstrap.min.css';

const BootstrapDialog: FC = () => {
  const dialog = useDialog();

  // Show Bootstrap Dialog
  const showBootstrapDialog = () => {
    dialog.openDialog(
      <Modal.Dialog>
        <Modal.Header closeButton>
          <Modal.Title>Bootstrap Dialog Example</Modal.Title>
        </Modal.Header>
        <Modal.Body>
          <p>Modal body text goes here.</p>
        </Modal.Body>
        <Modal.Footer>
          <Button variant="secondary" onClick={() => dialog.closeDialog()}>
            Close
          </Button>
          <Button variant="primary">Save changes</Button>
        </Modal.Footer>
      </Modal.Dialog>
    );
  };

  return (
    <div>
      <Button onClick={showBootstrapDialog}>Show Dialog</Button>
    </div>
  );
};

export default BootstrapDialog;
```
## License
MIT **Free Software!**
npm package: @surinderlohat/react-hooks
Description: Useful hooks for react JS, super easy to use and can handel all the major user cases. ##### Based on the React hooks and reactive programing. #### No extra dependencies pure react js code & lightweight.
Author: Surinder Singh
Latest version: 0.2.6

# React Hooks

Useful hooks for react JS, super easy to use and can handel all the major user cases.
##### Based on the React hooks and reactive programing.
#### No extra dependencies pure react js code & lightweight.

## Features
1. Useful hooks for react js.
2. Open source Free to use.

## Installation
```sh
npm install @surinderlohat/react-hooks
or
yarn add @surinderlohat/react-hooks
```
## API Documentation
https://surinderlohat.github.io/react-hooks/

| Hook Name |  DESCRIPTION | Details
| ------ | ------ | ----- |
| useLoader  | Show loader for async operations | [See more](https://github.com/surinderlohat/react-hooks/blob/main/hooks/loader.md)
| usePagination  | Manage pagination with easy way | [See more](https://github.com/surinderlohat/react-hooks/blob/main/hooks/use-pagination.md)
| useEffectAfterMount  | Use to avoid first time call to dependance  | [See more](https://github.com/surinderlohat/react-hooks/blob/main/hooks/use-pagination.md)
| useDebounceEffect  | Help to debounce input change | [See more](https://github.com/surinderlohat/react-hooks/blob/main/hooks/use-pagination.md)

## How to use
```sh
import { use hook Name here from API Documentation } from '@surinderlohat/react-hooks';


// i.e 
import { usePagination } from '@surinderlohat/react-hooks';

```

## License
MIT **Free Software!**
npm package: @surix/data-helpers
Description: Utilities for making it easy to work with Surix data
Author: Alpha Manuscript
Latest version: 0.7.4

# @surix/data-helpers

This library implements a set of utilities and wrappers that make it easier to work with data objects from the Surix API (e.g. entities).

These wrappers are used by the official client libraries to abstract away the raw Surix API data from the developer.

## Installation

```
npm install --save @surix/data-helpers
```

or

```
yarn add @surix/data-helpers
```

## Usage

```javascript
import { 
  wrapEntity,
  wrapEntityArray,
  wrapFile,
  wrapFileArray
} from '@surix/data-helpers'
```
or:

```javascript
const {
  wrapEntity,
  wrapEntityArray,
  wrapFile,
  wrapFileArray
} = require('@surix/data-helpers')
```

### `expandEntity`

Converts a user friendly version of an entity to the raw version of the entity.
```javascript
import { expandEntity } from '@surix/data-helpers';

const entity = {
  data: {
    name: 'My Name',
    age: 12,
    children: [
      {
        name: 'Some name'
      }
    ],
    address: {
      location: 'Nairobi'
    },
    isOldEnough: true
  },
  tags: []
};

const expandedEntity = expandEntity(entity);
```

**Note:** `Date()` will be converted to a string. `new Date()` will be converted to `datetime` so if you want dated treated correctly, you can use `new Date()`

### `expandArray`

Converts a user friendly version if an array to a raw array.
```javascript
const { expandArray } from '@surix/data-helpers';
const array = [ 1, 2, 3, { name: 'My name' }];
const expandedArray = expandArray(array)
```
### `wrapEntity`

```javascript
import { wrapEntity } from '@surix/data-helpers';

const raw = getRawEntityFromApi();
const wrappedEntity = new wrapEntity(raw);

const code = wrappedEntity.get('address.country.code', 'KE');

// using raw entity, to avoid getting 'undefined' errors, we have to check whether each field exists
const codeFromRaw = raw.data.address
  && raw.data.address.value.country
  && raw.data.address.country.value.code
  && raw.data.address.country.value.code.value || 'KE';
```

#### methods

- `wrappedEntity.get(key, defaultValue?)`: returns plain value of the specified field
- `wrappedEntity.type(key, defaultType?)`: returns type of the specified field
- `wrappedEntity.field(key, defaultType?)`: returns the raw field with the specified key
- `wrappedEntity.data()`: returns the data of the entity as a plain key-value object (without field metadata)

#### properties
You can access the top-level properties of the entity directly:
- `wrappedEntity._id` (or `id`)
- `wrappedEntity.tags`
- `wrappedEntity.createdAt`
- `wrappedEntity.updatedAt`
- `wrappedEntity.createdBy`
- `wrappedEntity.updatedBy`
- `wrappedEntity.rawEntity`: Returns the raw entity from the API
npm package: @surix/data-util
Description: Utilities for making it easy to work with Surix entities
Author: Alpha Manuscript
Latest version: 0.1.3

# @surix/data-util

This library implements a set of utilities and wrappers that make it easier to work with data objects from the Surix API (e.g. entities).

These wrappers are used by the official client libraries to abstract away the raw Surix API data from the developer.

## Usage

### `EntityWrapper` class

```javascript
import { EntityWrapper } from '@surix/data-util';

const raw = getRawEntityFromApi();
const wrapped = new EntityWrapper(raw);

const code = wrapped.value('address.country.code', 'KE');

// using raw entity, to avoid getting 'undefined' errors, we have to check whether each field exists
const codeFromRaw = raw.data.address
  && raw.data.address.value.country
  && raw.data.address.country.value.code
  && raw.data.address.country.value.code.value || 'KE';
```
npm package: @surjit_kumar/react-native-fullscreen
Description: This package helps developers to easily toggle between android full screen options and provides js methods to enable/disable full screen on android.
Author: kumar-surjit
Latest version: 0.0.4

# @surjit_kumar/react-native-fullscreen

This package helps developers to easily toggle between android full screen and normal mode by providing js methods to enable/disable full screen on android. It is specifically for android and has nothing to do with ios full screen.

## Installation

```sh
npm install @surjit_kumar/react-native-fullscreen
```

## Usage

```js
import Fullscreen from '@surjit_kumar/react-native-fullscreen';

// ...
export default function App() {
  const enterFullScreenMode = () => {
    Fullscreen.enableFullScreen();
  };
// ...
return (
    <View style={styles.container}>
      <View style={{ marginBottom: 16 }}>
        <Button onPress={enterFullScreenMode} title="Enable FullScreen Mode" />
      </View>
      <Button onPress={exitFullScreenMode} title="Exit FullScreen Mode" />
    </View>
  );
```

## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT
npm package: @surkus/ember-cli-branch
Description: Ember cli wrapper for Branch Javascript SDK
Author: Surkus HQ
Latest version: 1.0.2

ember-cli-branch
==============================================================================

Ember cli wrapper for Branch Javascript SDK


Compatibility
------------------------------------------------------------------------------

* Ember.js v2.18 or above
* Ember CLI v2.13 or above


Installation
------------------------------------------------------------------------------

```
ember install @surkus/ember-cli-branch
```


Usage
------------------------------------------------------------------------------

[Longer description of how to use the addon in apps.]


Contributing
------------------------------------------------------------------------------

### Installation

* `git clone <repository-url>`
* `cd ember-cli-branch`
* `npm install`

### Linting

* `npm run lint:js`
* `npm run lint:js -- --fix`

### Running tests

* `ember test` – Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions

### Running the dummy application

* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).

License
------------------------------------------------------------------------------

This project is licensed under the [MIT License](LICENSE.md).
npm package: @surkus/ember-cli-intercom
Description: Intercom addon for Ember CLI.
Author: Surkus Engineering
Latest version: 1.0.1

# surkus/ember-cli-intercom
my-addon
==============================================================================

[Short description of the addon.]


Compatibility
------------------------------------------------------------------------------

* Ember.js v2.18 or above
* Ember CLI v2.13 or above


Installation
------------------------------------------------------------------------------

```
ember install my-addon
```


Usage
------------------------------------------------------------------------------

[Longer description of how to use the addon in apps.]


License
------------------------------------------------------------------------------

This project is licensed under the [MIT License](LICENSE.md).
npm package: @surkus/ember-cli-leanplum
Description: The default blueprint for ember-cli addons.
Author: Surkus Inc.
Latest version: 1.0.3

ember-cli-leanplum
==============================================================================

Ember Cli wrapper for importing and configuring Leanplum SDK


Compatibility
------------------------------------------------------------------------------

* Ember.js v2.18 or above
* Ember CLI v2.13 or above


Installation
------------------------------------------------------------------------------

```
ember install ember-cli-leanplum
```


Usage
------------------------------------------------------------------------------

This plugin will setup Leanplum SDK and add call Leanplum.start() if the proper credentials
are set in your environment.

```javascript
// config/environment.js

leanplum: {
  appId: "LEANPLUM_APP_ID",
  apiKey: "LEANPLUM_API_KEY"
}
```

It will set Leanplum.setAppIdForDevelopmentMode if set the isDevelopmentMode to true.

```javascript
if (environment === 'development') {
  ENV.leanplum.isDevelopmentMode = true
  ...
}
```

You can pass variables to Leanplum by setting them in the config.

```javascript
ENV.leanplum.variables = {
  items: {
    color: 'red',
    size: 20,
    showBadges: true
  },
  showAds: true
}
```

Contributing
------------------------------------------------------------------------------

### Installation

* `git clone <repository-url>`
* `cd ember-cli-leanplum`
* `npm install`

### Linting

* `npm run lint:js`
* `npm run lint:js -- --fix`

### Running tests

* `ember test` – Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions

### Running the dummy application

* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).

License
------------------------------------------------------------------------------

This project is licensed under the [MIT License](LICENSE.md).
npm package: @surlymochan/codexclaw
Description: Feishu WebSocket channel gateway for local Codex CLI sessions
Latest version: 0.1.1

# CodexClaw

CodexClaw 是一个面向飞书的本地 Codex 助手网关。

它把飞书会话连接到本地 `codex` CLI 线程，并把对话、记忆和后台任务都保存在本地。

## 项目特点

- 每个飞书会话对应一个 Codex thread
- 默认纯文本，Markdown 会自动走飞书 JSON 2.0 模板卡
- Markdown 卡片会把首个 `#` 提成卡片标题，正文原样进入 `markdown` 组件
- session、去重、记忆、story 和定时任务都保存在本地
- 从仓库根目录的本地文件加载 guidance
- 支持 heartbeat 和 cron 后台任务

## 环境要求

- Node.js 22+
- 已开启 WebSocket 事件推送的飞书应用
- 本地可用的 `codex` CLI

## 快速开始

```bash
cp .env.example .env
npm install
npm run init:local-guidance
npm run dev
```

完整启动流程见 [docs/quickstart.md](docs/quickstart.md)。

如果你想用一条命令把本地准备和常驻服务一起装好，可以直接运行：

```bash
npx -y @surlymochan/codexclaw bootstrap --service
```

## 一行部署

如果你只想先把本地环境和引导文件准备好，可以运行：

```bash
npx -y @surlymochan/codexclaw bootstrap
```

如果你想连常驻服务一起安装，就加上 `--service`。

## 常驻运行

常驻运行可使用 macOS `launchd`：

```bash
npm run service:install
npm run service:restart
npm run service:uninstall
```

`npm run selfcheck` 会检查飞书凭据和本地 `codex`。

## 本地 Guidance

运行时会读取仓库根目录下的本地文件。这些文件已加入 gitignore。
通用模板在 [docs/templates](docs/templates)，本地引导说明在
[docs/local-guidance.md](docs/local-guidance.md)。

## Markdown 模板卡

助手回复中的 Markdown 默认使用飞书 JSON 2.0 卡片渲染：

- `#` 会被提取为卡片标题
- `body.elements` 里使用官方 `markdown` 组件
- 常见 Markdown 语法直接保留给飞书渲染
- 这条路径用于所有 Markdown 回复，不区分简报、日志或说明

## 文档

- [docs/quickstart.md](docs/quickstart.md)
- [docs/local-guidance.md](docs/local-guidance.md)
- [docs/open-source.md](docs/open-source.md)
- [CHANGELOG.md](CHANGELOG.md)
- [CONTRIBUTING.md](CONTRIBUTING.md)

## 命令

- `/reset` 重置当前 Codex session
- `/status` 查看 session 绑定状态
- `/diag` 查看运行诊断信息
- `/new` 新建 thread 并重新加载 guidance
- `/compact` 请求压缩并重新注入 guidance