npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

effect-github-actions-layer

v1.3.0

Published

An effect layer to interact with github actions toolkit

Readme

effect-github-actions-layer

Open in Visual Studio Code Last commit npm downloads npm bundle size

An effect layer to interact with github actions toolkit.

⚡ Quick start

🔶 Install

npm i effect-github-actions-layer
# or
pnpm i effect-github-actions-layer
# or
bun i effect-github-actions-layer

🔶 Use the layer

You can use the GithubActionsLayer object:

import { Effect, Layer, pipe } from 'effect';

import {
  GithubActionsLayer,
  GithubActionsLayerLive,
} from 'effect-github-actions-layer';

const task = pipe(
  GithubActionsLayer.exec('git diff', ['--quiet', './*'], {
    ignoreReturnCode: true,
  }),
  Effect.provide(GithubActionsLayerLive)
);

Or you can use the layer tag directly:

import {
  GithubActions,
  GithubActionsLayerLive,
} from 'effect-github-actions-layer';

const task = pipe(
  Effect.gen(function* () {
    const { exec } = yield* GithubActions;

    const result = yield* exec('git diff', ['--quiet', './*'], {
      ignoreReturnCode: true,
    });
  }),
  Effect.provide(GithubActionsLayerLive)
);

⚡ API

🔶 @actions/core - inputs/outputs

| function | description | | ------------------------------------------ | ------------------------------------------------------------------------- | | exportVariable | Export a variable for next steps environement | | setOutput | Make the action return a specific output, available for use in next steps | | getBooleanInput | Get a boolean input as per yaml spec | | getInput | Create a string input | | getMultilineInput | Create a multiline string input |

🧿 exportVariable

// Type
type ExportVariableEffect = (
  name: string,
  value: unknown
) => Effect.Effect<void, GithubActionsLayerError, GithubActionsInterface>;

// Usage
import { Effect, Layer, pipe } from 'effect';
import {
  GithubActionsLayer,
  GithubActionsLayerLive,
} from 'effect-github-actions-layer';

const task = pipe(
  GithubActionsLayer.exportVariable('myVar', 1),
  Effect.provide(GithubActionsLayerLive)
);

🧿 setOutput

// Type
type SetOutputEffect = (
  name: string,
  value: unknown
) => Effect<void, GithubActionsLayerError, GithubActionsInterface>;

// Usage
import { Effect, Layer, pipe } from 'effect';
import {
  GithubActionsLayer,
  GithubActionsLayerLive,
} from 'effect-github-actions-layer';

const task = pipe(
  GithubActionsLayer.setOutput('success', true),
  Effect.provide(GithubActionsLayerLive)
);

🧿 getBooleanInput

type GetBooleanInputEffect = (
  name: string,
  options?: InputOptions
) => Effect<boolean, GithubActionsLayerError, GithubActionsInterface>;

// Usage
import { Effect, Layer, pipe } from 'effect';
import {
  GithubActionsLayer,
  GithubActionsLayerLive,
} from 'effect-github-actions-layer';

const task = pipe(
  Effect.gen(function* () {
    const myBoolean = yield* GithubActionsLayer.getBooleanInput('my-var');
  }),
  Effect.provide(GithubActionsLayerLive)
);

🧿 getInput

// Type
type GetInputEffect = (
  name: string,
  options?: InputOptions
) => Effect<string, GithubActionsLayerError, GithubActionsInterface>;

// Usage
import { Effect, Layer, pipe } from 'effect';
import {
  GithubActionsLayer,
  GithubActionsLayerLive,
} from 'effect-github-actions-layer';

const task = pipe(
  Effect.gen(function* () {
    const myString = yield* GithubActionsLayer.getInput('my-var');
  }),
  Effect.provide(GithubActionsLayerLive)
);

🧿 getMultilineInput

// Type
type GetMultilineInputEffect = (
  name: string,
  options?: InputOptions
) => Effect<string[], GithubActionsLayerError, GithubActionsInterface>;

// Usage
import { Effect, Layer, pipe } from 'effect';
import {
  GithubActionsLayer,
  GithubActionsLayerLive,
} from 'effect-github-actions-layer';

const task = pipe(
  Effect.gen(function* () {
    const myStringArray = yield* GithubActionsLayer.getMultilineInput('my-var');
  }),
  Effect.provide(GithubActionsLayerLive)
);

🔶 @actions/core - exit codes

| function | description | | -------------------------- | --------------------------------------------- | | setFailed | Report an action failure and end the workflow |

🧿 setFailed

// Type
type SetFailedEffect = (
  message: string
) => Effect<void, GithubActionsLayerError, GithubActionsInterface>;

// Usage
import { Effect, Layer, pipe } from 'effect';
import {
  GithubActionsLayer,
  GithubActionsLayerLive,
} from 'effect-github-actions-layer';

const task = pipe(
  GithubActionsLayer.setFailed('Oh no!'),
  Effect.provide(GithubActionsLayerLive)
);

🔶 @actions/core - action state

| function | description | | -------------------------- | ---------------------------------------------- | | saveState | Save state to be used within an action wrapper | | getState | Get wrapper state |

🧿 saveState

// Type
type SaveStateEffect = (
  name: string,
  value: unknown
) => Effect<void, GithubActionsLayerError, GithubActionsInterface>;

// Usage
import { Effect, Layer, pipe } from 'effect';
import {
  GithubActionsLayer,
  GithubActionsLayerLive,
} from 'effect-github-actions-layer';

const task = pipe(
  GithubActionsLayer.saveState('myVar', 1),
  Effect.provide(GithubActionsLayerLive)
);

🧿 getState

// Type
type GetStateEffect = (
  name: string
) => Effect<string, GithubActionsLayerError, GithubActionsInterface>;

// Usage
import { Effect, Layer, pipe } from 'effect';
import {
  GithubActionsLayer,
  GithubActionsLayerLive,
} from 'effect-github-actions-layer';

const task = pipe(
  Effect.gen(function* () {
    const myString = yield* GithubActionsLayer.getState('myVar');
  }),
  Effect.provide(GithubActionsLayerLive)
);

🔶 @actions/core - logging

| function | description | | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | | isDebug | Check whether run is in debug mode | | debug | Create a debug level log (not visible by default) | | info | Create an info level log | | warning | Create a warning level log | | error | Create an error level log |

🧿 isDebug

// Type
type IsDebugEffect = () => Effect<
  boolean,
  GithubActionsLayerError,
  GithubActionsInterface
>;

// Usage
import { Effect, Layer, pipe } from 'effect';
import {
  GithubActionsLayer,
  GithubActionsLayerLive,
} from 'effect-github-actions-layer';

const task = pipe(
  Effect.gen(function* () {
    const debug = yield* GithubActionsLayer.isDebug();
  }),
  Effect.provide(GithubActionsLayerLive)
);

🧿 debug

// Type
type DebugEffect = (
  message: string
) => Effect<void, GithubActionsLayerError, GithubActionsInterface>;

// Usage
import { Effect, Layer, pipe } from 'effect';
import {
  GithubActionsLayer,
  GithubActionsLayerLive,
} from 'effect-github-actions-layer';

const task = pipe(
  GithubActionsLayer.debug('Blah blah'),
  Effect.provide(GithubActionsLayerLive)
);

🧿 info

// Type
type InfoEffect = (
  message: string
) => Effect<void, GithubActionsLayerError, GithubActionsInterface>;

// Usage
import { Effect, Layer, pipe } from 'effect';
import {
  GithubActionsLayer,
  GithubActionsLayerLive,
} from 'effect-github-actions-layer';

const task = pipe(
  GithubActionsLayer.info('Blah blah'),
  Effect.provide(GithubActionsLayerLive)
);

🧿 warning

// Type
type WarningEffect = (
  message: string,
  properties?: AnnotationProperties
) => Effect<void, GithubActionsLayerError, GithubActionsInterface>;

// Usage
import { Effect, Layer, pipe } from 'effect';
import {
  GithubActionsLayer,
  GithubActionsLayerLive,
} from 'effect-github-actions-layer';

const task = pipe(
  GithubActionsLayer.warning('Blah blah'),
  Effect.provide(GithubActionsLayerLive)
);

🧿 error

// Type
type ErrorEffect = (
  message: string,
  properties?: AnnotationProperties
) => Effect<void, GithubActionsLayerError, GithubActionsInterface>;

// Usage
import { Effect, Layer, pipe } from 'effect';
import {
  GithubActionsLayer,
  GithubActionsLayerLive,
} from 'effect-github-actions-layer';

const task = pipe(
  GithubActionsLayer.error('Blah blah'),
  Effect.provide(GithubActionsLayerLive)
);

🔶 @actions/exec

| function | description | | ---------------- | ------------------------------------ | | exec | cross-platform execution of commands |

🧿 exec

// type
type ExecEffect = (
  commandLine: string,
  args?: string[],
  options?: ExecOptions
) => Effect<number, GithubActionsLayerError, GithubActionsInterface>;

// Usage
import { Effect, Layer, pipe } from 'effect';
import {
  GithubActionsLayer,
  GithubActionsLayerLive,
} from 'effect-github-actions-layer';

const task = pipe(
  Effect.gen(function* () {
    const result = yield* GithubActionsLayer.exec('git reset', ['--hard']);
  }),
  Effect.provide(GithubActionsLayerLive)
);

🔶 @actions/github

| function | description | | ---------------------------- | ------------------------------ | | getContext | Get the current action context |

🧿 getContext

// Type
import type { GithubContext } from 'effect-github-actions-layer';

type GetContextEffect = () => Effect<
  GithubContext,
  GithubActionsLayerError,
  GithubActionsInterface
>;

// Usage
import { Effect, Layer, pipe } from 'effect';
import {
  GithubActionsLayer,
  GithubActionsLayerLive,
} from 'effect-github-actions-layer';

const task = pipe(
  Effect.gen(function* () {
    const githubContext = yield* GithubActionsLayer.getContext();
  }),
  Effect.provide(GithubActionsLayerLive)
);