{"id":13625931,"url":"https://github.com/classmethod/niseline","last_synced_at":"2026-03-04T05:33:51.797Z","repository":{"id":44869011,"uuid":"449712746","full_name":"classmethod/niseline","owner":"classmethod","description":"NiseLine is inspired by LocalStack. Goal of this tool is to create a mock service for LINE.","archived":false,"fork":false,"pushed_at":"2022-09-25T08:02:27.000Z","size":1384,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-29T21:27:00.584Z","etag":null,"topics":["api","liff","liff-sdk","line","line-api","linebot"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/classmethod.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-19T13:56:04.000Z","updated_at":"2025-06-20T21:46:59.000Z","dependencies_parsed_at":"2022-09-26T21:12:10.295Z","dependency_job_id":null,"html_url":"https://github.com/classmethod/niseline","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/classmethod/niseline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/classmethod%2Fniseline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/classmethod%2Fniseline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/classmethod%2Fniseline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/classmethod%2Fniseline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/classmethod","download_url":"https://codeload.github.com/classmethod/niseline/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/classmethod%2Fniseline/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30072567,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T05:31:57.858Z","status":"ssl_error","status_checked_at":"2026-03-04T05:31:38.462Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","liff","liff-sdk","line","line-api","linebot"],"created_at":"2024-08-01T21:02:05.999Z","updated_at":"2026-03-04T05:33:51.755Z","avatar_url":"https://github.com/classmethod.png","language":"TypeScript","readme":"# NiseLine\n\n![NiseLine](https://github.com/cm-dyoshikawa/niseline/blob/main/niseline-logo.png)\n\nNiseLine is inspired by [LocalStack](https://github.com/localstack/localstack). Goal of this tool is to create a mock service for [LINE](https://line.me/ja/).\n\n## Getting Started\n\nLaunch NiseLine server by [Docker image](https://hub.docker.com/r/dyoshikawa/niseline).\n\n```bash\ndocker run -d -p 3000:3000 dyoshikawa/niseline:latest\n```\n\nAnd install [NiseLiff SDK](https://www.npmjs.com/package/@niseline/niseliff).\n\n```bash\nnpm i @niseline/niseliff\n```\n\nUse NiseLiff SDK in your client app!\n\n```tsx\nimport { buildNiseliff } from '@niseline/niseliff'\nimport React from 'react'\nimport ReactDOM from 'react-dom'\n\nconst liff = buildNiseliff({\n  liffId: 'DUMMY_LIFF_ID',\n})\n\nliff\n  .init({\n    liffId: 'DUMMY_LIFF_ID',\n  })\n  .then(() =\u003e {\n    ReactDOM.render(\n      \u003cReact.StrictMode\u003eYour client app\u003c/React.StrictMode\u003e,\n      document.getElementById('root')\n    )\n  })\n```\n\n## NiseLiff SDK\n\n### Setup\n\nInstall [@niseline/niseliff](https://www.npmjs.com/package/@niseline/niseliff).\n\n```bash\nnpm i @niseline/niseliff\n```\n\n### Usage\n\n#### With npm package of LIFF SDK\n\nYou can use with [npm package of LIFF SDK](https://developers.line.biz/ja/docs/liff/developing-liff-apps/#use-npm-package). Switch between the real LIFF SDK and the NiseLiff SDK for each environment. In this example, the NiseLiff SDK is used only in the local environment.\n\n```ts\n// /path/to/config.ts\n\nexport const env: 'local' | 'development' | 'staging' | 'production' = 'local'\n```\n\n```ts\n// /path/to/liff.ts\n\nimport * as config from '/path/to/config'\nimport realLiff, { Liff } from '@line/liff'\nimport { buildNiseliff } from '@niseline/niseliff'\n\nconst liff =\n  config.env === 'local' ? buildNiseliff({ liffId: 'DUMMY_LIFF_ID' }) : realLiff\nexport default liff\n```\n\n```tsx\n// /path/to/index.tsx\n\nimport liff from '/path/to/liff'\nimport React from 'react'\nimport ReactDOM from 'react-dom'\n\nliff.init({ liffId: 'DUMMY_LIFF_ID' }).then(() =\u003e {\n  ReactDOM.render(\n    \u003cReact.StrictMode\u003eYour client app\u003c/React.StrictMode\u003e,\n    document.getElementById('root')\n  )\n})\n```\n\n#### With CDN of LIFF SDK\n\nYou can also use with [CDN of LIFF SDK](https://developers.line.biz/ja/docs/liff/developing-liff-apps/#specify-cdn-path). If you use typescript, it is recommended that you install the @line/liff package. The actual runtime is a CDN, but the type definitions are available from the npm package.\n\n```ts\n// /path/to/config.ts\n\nexport const env: 'local' | 'development' | 'staging' | 'production' = 'local'\n```\n\n```tsx\n// /path/to/index.tsx\n\nimport * as config from '/path/to/config'\nimport { Liff } from '@line/liff'\nimport { buildNiseliff } from '@niseline/niseliff'\nimport React from 'react'\nimport ReactDOM from 'react-dom'\n\ndeclare global {\n  var liff: Liff\n}\n\nif (config.env === 'local') {\n  window.liff = buildNiseliff({\n    liffId: 'DUMMY_LIFF_ID',\n  })\n}\n\nwindow.liff\n  .init({\n    liffId: 'DUMMY_LIFF_ID',\n  })\n  .then(() =\u003e {\n    ReactDOM.render(\n      \u003cReact.StrictMode\u003eYour client app\u003c/React.StrictMode\u003e,\n      document.getElementById('root')\n    )\n  })\n```\n\n### Features\n\n- [x] [Ready](https://developers.line.biz/ja/reference/liff/#ready)\n- [x] [Id](https://developers.line.biz/ja/reference/liff/#id)\n- [x] [Initialize liff app](https://developers.line.biz/ja/reference/liff/#initialize-liff-app)\n- [x] [Get os](https://developers.line.biz/ja/reference/liff/#get-os)\n- [x] [Get language](https://developers.line.biz/ja/reference/liff/#get-language)\n- [x] [Get version](https://developers.line.biz/ja/reference/liff/#get-version)\n- [x] [Get line version](https://developers.line.biz/ja/reference/liff/#get-line-version)\n- [x] [Is in client](https://developers.line.biz/ja/reference/liff/#is-in-client)\n- [x] [Is logged in](https://developers.line.biz/ja/reference/liff/#is-logged-in)\n- [x] [Is api available](https://developers.line.biz/ja/reference/liff/#is-api-available)\n- [x] [Login](https://developers.line.biz/ja/reference/liff/#login)\n- [x] [Logout](https://developers.line.biz/ja/reference/liff/#logout)\n- [x] [Get access token](https://developers.line.biz/ja/reference/liff/#get-access-token)\n- [x] [Get ID token](https://developers.line.biz/ja/reference/liff/#get-id-token)\n- [x] [Get decoded ID token](https://developers.line.biz/ja/reference/liff/#get-decoded-id-token)\n- [x] [Get context](https://developers.line.biz/ja/reference/liff/#get-context)\n- [x] [Get profile](https://developers.line.biz/ja/reference/liff/#get-profile)\n- [x] [Get friendship](https://developers.line.biz/ja/reference/liff/#get-friendship)\n- [x] [Permission query](https://developers.line.biz/ja/reference/liff/#permission-query)\n- [x] [Permission request all](https://developers.line.biz/ja/reference/liff/#permission-request-all)\n- [x] [Permanent link create url by](https://developers.line.biz/ja/reference/liff/#permanent-link-create-url-by)\n- [x] [Permanent link create url](https://developers.line.biz/ja/reference/liff/#permanent-link-create-url)\n- [x] [Permanent link set extra query param](https://developers.line.biz/ja/reference/liff/#permanent-linke-set-extra-query-param)\n- [x] [Send messages](https://developers.line.biz/ja/reference/liff/#send-messages)\n- [x] [Open window](https://developers.line.biz/ja/reference/liff/#open-window)\n- [x] [Share target picker](https://developers.line.biz/ja/reference/liff/#share-target-picker)\n- [x] [Scan code v2](https://developers.line.biz/ja/reference/liff/#scan-code-v2)\n- [x] [Scan code](https://developers.line.biz/ja/reference/liff/#scan-code)\n- [x] [Close window](https://developers.line.biz/ja/reference/liff/#close-window)\n- [x] [Init plugins](https://developers.line.biz/ja/reference/liff/#init-plugins)\n- [ ] [Bluetooth get availability](https://developers.line.biz/ja/reference/liff/#bluetooth-get-availability)\n- [ ] [Bluetooth request device](https://developers.line.biz/ja/reference/liff/#bluetooth-request-device)\n- [ ] [Bluetooth referring device](https://developers.line.biz/ja/reference/liff/#bluetooth-referring-device)\n\n## NiseLine Server\n\n### Setup\n\nPull and run [dyoshikawa/niseline](https://hub.docker.com/r/dyoshikawa/niseline).\n\n#### Docker\n\n```bash\ndocker run -d -p 3000:3000 dyoshikawa/niseline:latest\ncurl http://localhost:3000/niseline/api/ping\n# =\u003e {\"ping\":\"pong\"}\n```\n\n#### Docker Compose\n\n```yaml\n# docker-compose.yml\nversion: '3'\nservices:\n  niseline:\n    image: dyoshikawa/niseline:latest\n    ports:\n      - 3000:3000\n```\n\n```bash\ndocker compose up -d\ncurl http://localhost:3000/niseline/api/ping\n# =\u003e {\"ping\":\"pong\"}\n```\n\n### Usage\n\n```bash\ncurl --request POST \\\n  --url http://localhost:3000/niseline/api/users \\\n  --header 'content-type: application/json' \\\n  --data '{\"id\": \"FOO_ID\",\"name\": \"Foo\",\"picture\": \"http://example.com/foo.jpg\",\"email\": \"foo@example.com\"}'\n# =\u003e null\n\ncurl -v -X POST 'http://localhost:3000/oauth2/v2.1/verify' \\\n  -H 'Content-Type: application/x-www-form-urlencoded' \\\n  --data-urlencode 'id_token=FOO_ID' \\\n  --data-urlencode 'client_id=1234567890'\n# =\u003e {\"iss\":\"https://example.com\",\"sub\":\"FOO_ID\",\"aud\":\"1234567890\",\"exp\":1504169092,\"iat\":1504263657,\"nonce\":\"0987654asdf\",\"amr\":[\"pwd\"],\"name\":\"Foo\",\"picture\":\"http://example.com/foo.jpg\",\"email\":\"foo@example.com\"}\n```\n\n### Features\n\n#### Login API\n\n- [ ] [Issue access token](https://developers.line.biz/ja/reference/line-login/#issue-access-token)\n- [x] [Verify access token](https://developers.line.biz/ja/reference/line-login/#verify-access-token)\n- [ ] [Refresh access token](https://developers.line.biz/ja/reference/line-login/#refresh-access-token)\n- [ ] [Revoke access token](https://developers.line.biz/ja/reference/line-login/#revoke-access-token)\n- [x] [Verify ID token](https://developers.line.biz/ja/reference/line-login/#verify-id-token)\n- [x] [Get user profile](https://developers.line.biz/ja/reference/line-login/#get-user-profile)\n- [x] [Get friendship status](https://developers.line.biz/ja/reference/line-login/#get-friendship-status)\n\n#### Messaging API\n\n- [x] [Send reply message](https://developers.line.biz/ja/reference/messaging-api/#send-reply-message)\n- [x] [Send push message](https://developers.line.biz/ja/reference/messaging-api/#send-push-message)\n- [ ] [Send multicast message](https://developers.line.biz/ja/reference/messaging-api/#send-multicast-message)\n- [ ] [Send narrowcast message](https://developers.line.biz/ja/reference/messaging-api/#send-narrowcast-message)\n- [ ] [Get narrowcast progress status](https://developers.line.biz/ja/reference/messaging-api/#get-narrowcast-progress-status)\n- [ ] [Send broadcast message](https://developers.line.biz/ja/reference/messaging-api/#send-broadcast-message)\n- [ ] [Get content](https://developers.line.biz/ja/reference/messaging-api/#get-content)\n- [ ] [Get quota](https://developers.line.biz/ja/reference/messaging-api/#get-quota)\n- [ ] [Get consumption](https://developers.line.biz/ja/reference/messaging-api/#get-consumption)\n- [ ] [Get number of reply messages](https://developers.line.biz/ja/reference/messaging-api/#get-number-of-reply-messages)\n- [ ] [Get number of push messages](https://developers.line.biz/ja/reference/messaging-api/#get-number-of-push-messages)\n- [ ] [Get number of multicast messages](https://developers.line.biz/ja/reference/messaging-api/#get-number-of-multicast-messages)\n- [ ] [Get number of broadcast messages](https://developers.line.biz/ja/reference/messaging-api/#get-number-of-broadcast-messages)\n- [ ] [Retry api request](https://developers.line.biz/ja/reference/messaging-api/#retry-api-request)\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclassmethod%2Fniseline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclassmethod%2Fniseline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclassmethod%2Fniseline/lists"}